Saturday, August 09, 2008

Thinking and Us.

These days I have been reading about Thinking. Well. fundamentally what it says is that the way we think or the size of our thinking makes a big difference in what we are or what we become in Life.

As I read about it I found many things to be true.

If our goals in Life are limited then our mind, body etc. will only generate enough energy to reach them. It will never try to go beyond it. It seems that there is no limit on human capacity. It is that how much we draw out of it which matters.

So, that's why it is necessary to think big and then let our unlimited potential fulfill our dreams.

Our thinking gets affected a lot by our environment, it seems. If from childhood we have been listening of defeats, disappointments and negativities then it is hard to develop a positive attitude towards Life. If we grow hearing that getting good food and money is the ultimate aim of Life then we find it difficult to think beyond them.

So, in order to be positive it is very necessary to be in good company. In our daily lives we meet all sort of people. Some are ever complaining, some are neutral and some are damn positive and wanna become something in Life. We all live in the same world, yet we have different attitudes. And ultimately it makes a big difference in the quality of our Lives.

If we look at it, Life is a ultimate gift. There is nothing to lose. We had nothing when we entered. So, there is only one outcome possible in every endeavour of Life and that is Win. Even if you are unable to achieve something you end up learning something. That's the beauty of Life.

Yet as we grow we develop more and more fears. We don't wanna take the next step just becoz we don't wanna lose what we already have. We are so attached to what we have now that we limit our scope. But that sucks. I believe at every stage of Life one should try and develop more independence. One should try and be more free, free in doing whatever he wants to. That's when you feel that you are growing, that you are living.

Really, if we are not facing failures that we are not taking enough chances.

But to come out of the cocoon of our daily lives takes some effort. It is not easy to come out of the comfort zone. But once we realize that there is nothing called comfort zone and there are limitless possibilities lying outside, we won't shy of taking a chance.

So, we need to expand our thinking. We need to remove the boundaries which we have put on ourselves. We need to think as big as possible and then proceed. Then only it will be possible to become what we deserve.

But the magic won't occur in a day. It will need effort. All the Best! :)

Happy Living. :)

Monday, June 23, 2008

Configuring Spring for your Web App

Configuring Spring is pretty easy.

Add a listener:-

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

The ContextLoaderListener implements ServletContextListener.

You can also configure the xml which Spring should read:-

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/context/applicationContext-*.xml</param-value>
<!--
The following param-value should be used instead if we ever want to search for context files anywhere in the classpath
<param-value>/WEB-INF/classes/context/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
-->
</context-param>

Hope it helps,
Thanks.

Configuring struts for your Web Application

Configuring struts in your web application is pretty simple. You have to add a filter in you web.xml file:-


<filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>



And then provide appropriate mapping, like:-



<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


So, now every url will be passed through the struts filter.

Hope you find it useful.
Thanks.

Strtus, Spring and Hibernate

Now-a-days web applications are heavily using Struts, Spring and Hibernate for developing web apps.

Struts provide a MVC-based Action Framework for developing Web Applications.

Spring provides dependency injection and thereby can be used for managing the beans in your application.

Hibernate provides a simple yet very effective ORM tool. It simplifies most of the database related stuff and the developer has to only bother about business logic.

Thanks.