tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Horvath" <horzs...@mail.tiszanet.hu>
Subject Re: NullPointerException in getSession
Date Mon, 01 Oct 2001 14:34:57 GMT
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" <manu_kry@yahoo.com>
To: <tomcat-user@jakarta.apache.org>
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
>
>


Mime
View raw message