There are two server used to run my application. If some problem occurs with one server then other is used as a back up to run the application. But in the process of switching server the application session got expired and the user has to log-in again to start the application. Can anyone suggest me how to keep my session alive and active when the server change is occurred.
Jeet has rightly point out above that you have to use either in-memory or JDBC replication to persist your active session during fail-over from one server to another server.
Here is the link to Manage HTTP Session States demo tutorial which gives you clear picture how HTTP sessions are maintain during fail-over.
Hope this helps.