In your web.xml file, declare a servlet like this : 


And in your servlet, the init() method is called when the server start : 

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class myServletextends HttpServlet
  /** Init */
  public void init(ServletConfig config) throws ServletException
    // do your action

  public void doGet(HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException
   // ...



>>> [EMAIL PROTECTED] 07/10/2005 18:32:03 >>>

I'm writing a web application for tomcat and I have a strange request:
I would like to execute an initializing function in order to
initialize correctly my applicaiton when it becomes available
(deployed into tomcat or tomcat itself is started)

I have written such behaviour in a method, so what can I do to execute it?

Thanks for your help, Matteo

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to