tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefanos Karasavvidis <ste...@multimedia-sa.gr>
Subject getServletContext() throws NullPoinetException
Date Tue, 10 Jul 2001 14:46:04 GMT
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(ContextManager.java:797)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.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



Mime
View raw message