You get this error message in 2 cases:
1. You want to acces the session, but it doesn't exist (use
getSession(true))
2. You want to acces a session value, but it doesn't exist:
e.g: request.getSession().getValue("ANYTHING"), and ANYTHING variable
not in the session.
----- Original Message -----
From: "Manu KY" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 01, 2001 4:34 PM
Subject: Re: NullPointerException in getSession
> Hi,
> please paste the code for easy debugging!!!.
>
> did you do getSession(true)?
>
> Manu
> >Hi all. Does anyone know a solution to the exception presented
> >below? It happens when I try to get an http session.
> >The interesting thing is that this problem is not deterministic:
> >sometimes it happens and sometimes it does not (obviously, using
> >the same code and the same environment).
> >
> >Any help is welcome!
> >
> >Thanks,
> >
> >Daniel Novy.
> >
> >java.lang.NullPointerException
> > at
> >org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:497)
> > at
>
>org.apache.tomcat.facade.HttpServletRequestFacade.getSession(HttpServletReq
u
> >estFacade.java:382)
> > at cetip.web.CtpRequest.getHttpSession(CtpRequest.java:350)
> > at cetip.web.CtpWebUser.getSessionAttribute(CtpWebUser.java:467)
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>