![]() |
JBridge: Certification Question Of The Day |
| JBridge Home >> Certification Questions >> Question for Thursday 8th May 2003 | Thursday 8th May 2003 |
|
From the list below, identify legitimate ways to impose a 30 minute session timeout. (2 correct answers) A request.invalidateSession(1800);
(request is an instance of HttpServletRequest)
B session.invalidate(30); (session is an
instance of HttpSession) C In web.xml: <session-config> <session-timeout>30</session-timeout> </session-config> D In web.xml: <servlet> <servlet-name>MyServlet</servlet-name> <servlet-class>uk.co.jbridge.servlet.MyServlet</servlet-class> <servlet-session-timeout>30</servlet-session-timeout> </servlet> E session.setMaxInactiveInterval(1800);
(sesson is an instance of HttpSession)
F session.setMaxInactiveInterval(30);
(session is an instance of HttpSession) G In web.xml: <session-config> <session-timeout>1800</session-timeout> </session-config> Page down for the answer... The AnswerThe correct answers are C and E. You can set a session to
timeout using the |
EMail: dbridgewater@jbridge.co.uk
Phone: +44 (0)1943 877414
Fax: +44 (0)1943 877414
Mail: David
Bridgewater, Willow Dene, Bradford Road, Menston, Ilkley, West Yorkshire, LS29
6ED, UK
Copyright © 2003 David Bridgewater. All rights reserved.