Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP Session time out Question

843840Dec 9 2008 — edited Dec 27 2008
hi, I want to display a message on jsp page when session expires.I did the following

set <session-config> in web.xml
<session-config>
      <session-timeout>2</session-timeout>    <!-- 2 minutes -->
    </session-config>
Then I check each jsp page with following code.
if(session.isNew()){
	response.sendRedirect("display.jsp?reqSes=new");
} 
Now everything works correctly.When I modify the display.jsp page as below it is giving 500 error which is a null pointer exception.
if(request.getParamter("reqSes") != null){
out.println("Session Expired");}
this error occurs only when page is redirected from another jsp page, if the page is called first time it doesn't happen.
What is it I need to modify to work correctly.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2009
Added on Dec 9 2008
3 comments
412 views