Do you, perhaps, implement the init method and not call
super.init(config)? Did this once and I'll never do it again.
Randy
> -----Original Message-----
> From: Stefanos Karasavvidis [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 10:46 AM
> To: [EMAIL PROTECTED]
> Subject: getServletContext() throws NullPoinetException
>
>
> I've just installed tomcat 3.2.2 and have the following problem.
>
> I want to call getServletContext() from a servlets service method but
> get the folowing exception
> *Internal Servlet Error:*
>
> java.lang.NullPointerException
> at
> javax.servlet.GenericServlet.getServletContext(GenericServlet.
java:205)
> at TestServlet.service(TestServlet.java:32)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
> org.apache.tomcat.core.ContextManager.internalService(ContextM
anager.java:797)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
> cessConnection(Ajp12ConnectionHandler.java:166)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
t.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
ol.java:501)
> at java.lang.Thread.run(Thread.java:484)
>
>
> Moreover the getServletConfig() returns null which is
> probably the main
> reason for this problem
>
> Any ideas??
>
> Stefanos
>
>