tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Brogden <>
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
WBB -  Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam

View raw message