wood burning stoves 2.0*
The moose likes Servlets and the fly likes Regarding Session Timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Regarding Session Timeout" Watch "Regarding Session Timeout" New topic
Author

Regarding Session Timeout

kamal palia
Greenhorn

Joined: Jul 20, 2012
Posts: 17
What value(default) session.getMaxInactiveInterval() will return.
and
If i am using
<session-config>
<session-timeout>2</session-timeout>
</session-config>
in my web.xml and session.getMaxInactiveInterval() in jsp then which timeout my app will use.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

kamal palia wrote:What value(default) session.getMaxInactiveInterval() will return.

It is depends on server. it is 30 minutes in tomcat. and above mentioned method returns this values in seconds.
kamal palia wrote:
If i am using
<session-config>
<session-timeout>2</session-timeout>
</session-config>
in my web.xml and session.getMaxInactiveInterval() in jsp then which timeout my app will use.

do you mean *set*MaxInactiveInterval ? if that jsp executes then setMaxInactiveInterval override web.xml
kamal palia
Greenhorn

Joined: Jul 20, 2012
Posts: 17
My weblogic.xml contains
<weblogic-web-app>
<resource-description>
<res-ref-name>jdbc/pgDataSource</res-ref-name>
<jndi-name>weblogic.jdbc.jts.pgDataSource</jndi-name>
</resource-description >
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>300</param-value>
</session-param>
</session-descriptor>
<context-root>/</context-root>
</weblogic-web-app>

i have given 300 sec of timeout but don't know why session do not get timeout even i tried this in web.xml(5 min)
<session-config>
<session-timeout>5</session-timeout>
</session-config>

any idea?
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi,

Can you please tell, how could you say so that session is not got timeout?

Thanks,
Shailesh
kamal palia
Greenhorn

Joined: Jul 20, 2012
Posts: 17
Thanks to all for their help.....
web.xml entry for session time out is working fine.
 
GeeCON Prague 2014
 
subject: Regarding Session Timeout