At the JSP level.  I am simply doing a session.getAttribute( String string);
when string == fname, lname or accesslevel, everything is fine but when
string == userID or password JRUN throws a NullPointerException:

java.lang.NullPointerException
        at jrun__user2ejsp9._jspService(jrun__user2ejsp9.java:56)
        at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
        at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
        at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
        at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
        at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
        at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
[blah, blah, blah...]

Essentially, what I am attempting is to have a JSP that permits an
authenticated user to change his/her password - something that should be
rather simplistic.

Mark

----- Original Message -----
From: "Gokul Singh" <[EMAIL PROTECTED]>
Sent: Friday, December 28, 2001 6:12 AM


> Where is the NullPointerException being raised?
>
> ----- Original Message -----
> From: "Mark Galbreath" <[EMAIL PROTECTED]>
> Sent: Friday, December 28, 2001 4:02 AM
>
> > Can anybody give me a clue as to why I am getting null pointer
exceptions
> > when I access userID, password, or minit from a JSP page but not fname,
> > lname or accesslevel?
> >
> > while( rs.next()) {
> >     String id = rs.getString( 1);  //get userID (email address)
> >     String pw = rs.getString( 2);  //get password
> >
> >     if( parmUserid.equalsIgnoreCase( id) && parmPW.equalsIgnoreCase(
pw))
> {
> >         String fname = rs.getString( "fname");
> >         String minit = rs.getString( "minit");
> >         String lname = rs.getString( "lname");
> >         String accesslevel = rs.getString( "accesslevel");
> >
> >         session.setAttribute( "userID", id);
> >         session.setAttribute( "password", pw);
> >         session.setAttribute( "fname", fname);
> >         if( minit != null) { session.setAttribute( "minit", minit); }
> >         session.setAttribute( "lname", lname);
> >         session.setAttribute( "accesslevel", accesslevel);
> > ...

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to