hi,
you just have to edit the web.xml file in your web applications /WEB-INF
directory

<web-app>
..
   <servlet>
     <servlet-name>com.itp.nf.webcontent.PropsServlet</servlet-name>
     <servlet-class>com.itp.nf.webcontent.PropsServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
..
</web-app>

the number in the <load-on-startup> element signalises the startup-order if
there where more than 1 servlets to start.
of course you can specify an alias name in <servlet-name> instead of the
full qualified package name.

btw: this is independent of the server - every server 2.2 compliant server
follows this scheme

hope that helps (if you get an error, post it - there could be many:
servlet class not found, references to null values in init() etc)
joe


At 22:47 15.01.01, Sreemushta, Santhosh (c) wrote:
>   I want to have a Startup-Servlet with my Tomcat Server. Can someone
>provide me an example of how to do the same.  When I try to follow the
>step's outlined in JGuru I get an error, I'll appreciate if someone can
>provide me with a pointer.
>Regards
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to