How can I obtain the timeout value I set
<session-config>
<session-timeout>2</session-timeout>
</session-config>
in my web.xml programatically in a servlet?
thanks
mark
WuyaSea Operator - 01 Nov 2006 00:22 GMT
I think it's one of ServletContext.getAttribute() or
ServletConfig.getInitParameter() , use getInitParameterNames() to get
all possible names.
see API doc http://java.sun.com/products/servlet/2.2/javadoc/
WuyaSea Operator
http://www.wuyaSea.com/board/280/java , answer question - earn cash.
> How can I obtain the timeout value I set
>
[quoted text clipped - 7 lines]
>
> mark
Wesley Hall - 01 Nov 2006 00:57 GMT
> How can I obtain the timeout value I set
>
[quoted text clipped - 3 lines]
>
> in my web.xml programatically in a servlet?
I believe the method getMaxInactiveInterval() on HttpSession will do
what you require.
Jim - 01 Nov 2006 08:35 GMT
> > How can I obtain the timeout value I set
> >
[quoted text clipped - 6 lines]
> I believe the method getMaxInactiveInterval() on HttpSession will do
> what you require.
Jim, getMaxInactiveInterval worked. Thanks