Hi,

I am dropping this note after spending hours trying to figure out why
my webapp encounters an NPE trying to obtain a param from request.

Scenario:
Moving an old web app from JRun to Tomcat 5.5.23. The app uses custom
taglibs that provide for user authentication and login and this is
where I am encountering the issue. When I try and input the username
and password in the Login form for the admin console and submit it, I
get the following error (and trace).

Much appreciate if anyone can shed some light, or have any suggestions.

Thanks in advance,

Rahul


----- Quoted Error ----

HTTP Status 500

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception org.apache.jasper.JasperException
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



root cause java.lang.NullPointerException
        java.util.Hashtable.get(Hashtable.java:333)
        
org.apache.tomcat.util.http.Parameters.getParameterValues(Parameters.java:193)
        org.apache.tomcat.util.http.Parameters.getParameter(Parameters.java:238)
        org.apache.catalina.connector.Request.getParameter(Request.java:1007)
        
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353)
        
eluminet.wlp.modules.users.servlet.tags.UserLoginTag.doStartTag(UserLoginTag.java:101)
        org.apache.jsp.admin.index_jsp._jspService(index_jsp.java:81)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

----- End of Error -----


Also, here is the relevant snippet from the taglib handler
implementation which is blowing up on the first call to
pageContext.getRequest ().getParameter (username).

----- quote ----

           username = pageContext.getRequest ().getParameter (username);
           System.out.println ("param : 'username' , value: '" +
username + "'");
           password = pageContext.getRequest ().getParameter (password);
           System.out.println ("param : 'password' , value: '" +
password + "'");
           logout = pageContext.getRequest ().getParameter (logout);
           System.out.println ("param : 'logout' , value: '" + logout + "'");

------ end quote -----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to