tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Brogden <wbrog...@bga.com>
Subject ServletContext null
Date Fri, 14 Apr 2000 13:32:38 GMT


Mario Imperato wrote:
> 
> Gael, I checked out with my code and it worked for me. As a matter of fact in my case
> I put it into the init(ServletConfig config) method. Don't know if it makes any difference.
> I see now your final comment on the <context-param>...mmmhh! dunno.
> Do you have problems in fetching the servletContext in the doGet?
> I'm saying this because in my case if I have an init method in my class I get
> a NullPointerException when fetching the ServletContext in the doGet method. I'm just
> wondering if you have the same type of problem.

Be sure that your init() calls the super.init method!

	public void init(ServletConfig config) throws ServletException
	{
		super.init(config);
        etc
-- 
WBB - wbrogden@bga.com  Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at  http://www.lanw.com/java/javacert/

Mime
View raw message