tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Karl <m...@gcisoftware.com>
Subject Problem with getRequestDispatcher
Date Tue, 30 May 2000 21:05:51 GMT
I am trying to forward the request from a Servlet to a JSP using
getRequestDispatcher.  Tomcat is giving me an error when I try to do
this:

ServletContext sc = getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher("../CustReg.jsp");
rd.forward(req, res);

I get:
java.lang.NullPointerException
        at CustReg.doPost(CustReg.java:65)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)

        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)

        at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)

        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)

        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)

        at java.lang.Thread.run(Thread.java:498)

Is this a bug in Tomcat?  If so is there another way to do this?
thanks
mike



Mime
View raw message