Execute servlet on startup of the application

后端 未结 3 1675
野的像风
野的像风 2021-01-15 11:28

I build a web application with JSPs and in my servlet I have:

public class MyServlet extends HttpServlet {
    protected void processRequest(HttpServletReque         


        
3条回答
  •  不知归路
    2021-01-15 12:21

    You can configure it in Tomcat's web.xml (or corresponding configuration files in similar servers), like below using the tag :

    
        MyOwnServlet
        MyServlet
        1
     
    

提交回复
热议问题