You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeremy Linzer <jl...@alabanza.com> on 2000/07/14 21:28:28 UTC

Error 500

Sorry about that my last message had the wrong title
Re: ServletContext.setAttribute()


> Hi all,
>
> I am pretty new to this and I have what maybe a simple question. I wrote
> a simple Servlet (passes a message to a JSP and JSP outputs it). It
> compiles fine but when I try accessing it I got a 500 error:
>
> java.lang.NullPointerException:
>         at HelloWorldServlet.service(HelloWorldServlet.java:14)
>         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)
>
> line 14 that it refers to in the servlet is rd.forward(req, res);
> rd is of type RequestDispatcher
>
> If anyone has any ideas or suggestions I would really appreciate it.
>
> THanks,
> Jeremy