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.