tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Affonso Loyola <aloy...@domain.com.br>
Subject Weird getParameter Problem with Apache + Tomcat
Date Sat, 15 Jan 2000 05:31:44 GMT
People I'm having this strange error since im using Tomcat ...

The problem only occur when accessing the Servlet by Ajp11Connector.
When I access the Servlet by the built in HttpServer the problem does
not happen!

If anybody knows something about! Please help me....

Thanks,

Affonso Loyola

THE CODE:
-----------------------------------
  private boolean handleRegistrationPage1(HttpServletRequest req) throws
Servlet
Exception, IOException {
    
    HttpSession session = req.getSession(false);
    if(session == null) return false;
      
    String state = req.getParameter("state"); 
    session.setAttribute("REGISTRATION.STATE", state); ---------> seems
that state is null
    session.setAttribute("REGISTRATION.COUNTRY", "1");


THE ERROR:
-----------------------------------
Error: 500

Internal Servlet Error:

java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java)
        at
org.apache.tomcat.core.ApplicationSession.setAttribute(ApplicationSession.java:234)
        at
parperfeito.servlet.Registration.handleRegistrationPage1(Registration.java:229)
        at parperfeito.servlet.Registration.doPost(Registration.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
        at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
        at
org.apache.tomcat.core.InvokerServlet.service(InvokerServlet.java:239)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java:626)
        at
org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java:534)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
        at
org.apache.tomcat.core.Context.handleRequest(Context.java:644)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
        at
org.apache.tomcat.service.Ajp11ConnectionHandler.processConnection(Ajp11ConnectionHandler.java:137)
        at
org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:304)
        at java.lang.Thread.run(Thread.java)

Mime
View raw message