What do you mean "evaluate"? The following code:
> If (session==null)
can never cause a NullPointerException. Never. Ever.
So are you getting the exception on
> Httpsession session=request.getSession(false);
Or on,
> response.sendRedirect("/myapp/sessnull.html");
Or somewhere else in your code? If it's one of the first two, you need to
figure out why you're getting a null request or response,...
-- Bill K.
> -----Original Message-----
> From: Antonio Vazquez [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 1:49 AM
> To: Tomcat-User@Jakarta. Apache. Org
> Subject: How to know If a session is invalidated
> Importance: High
>
>
> 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
>