You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Antonio Vazquez <va...@aucland.com> on 2001/05/04 10:48:52 UTC

How to know If a session is invalidated

Hi all,
I have a problem with session invalidate.
I want to know when a session is invalid. In a servlet I use the follow
code:

Httpsession session=request.getSession(false);
If (session==null)
	response.sendRedirect("/myapp/sessnull.html");

This code just works fine but in a JSP page, when I try to evaluate if the
session object is null, I receive a null pointer Exception.

Can anybody helps me?

Thanks