
Consider a case where we are working on a java application.After few hours of continuous work ,my application gets logged out in the middle. I would like to know what statement/keyword is responsible for it??

If you want to make session timeout programatically, you can use the method setMaxInactiveInterval() method of interface HTTPSession that sets the maximum time in seconds before a session becomes invalid. Its syntax is:
session.setMaxInactiveInterval(int interval);
And if you want to specify the timeout of a session in the deployment descriptor of your web application (web.xml)then do the following:
<web-app> <session-config> <session-timeout>10</session-timeout> </session-config> </web-app>
Here time is expressed in minutes.

I got ur point.,but that happens only if u have left the applcation idle for some time,but i would like to knw like when we are working on an application for some time then suddenly it gets logged out in the middle i.e during our work....why is it so??
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.