ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  How Servlet Containers Work
Subject:   Servlet init() method not getting called
Date:   2007-04-01 00:36:18
From:   NDLexus
Hi I made a simple class that implements javax.servlet.Servlet and that's the only class that's in my .WAR folder, I run JBOSS and I see it deployes my .WAR file, but the init() method doesn't get triggered. What do I need to do to make the init() method be called? Isn't the servlet instantiated when the web server loads the web app, or does it wait for the very first request to come in? From your sample code I don't see when the init() method is called so it means that it doesn't wait for the first request.


Please help I'm stuck on this one big time.


Thanks.
NDLexus


1 to 1 of 1
1 to 1 of 1