The specific method is as follows. in the root directory of tomcat, for example, the directory of my server is D: apacheSoftwareFoundationTomcat55 find the webxml file in the conf folder and remove the following servlet and servlet-mapping element annotations: & lt; servlet & gt; the procedure is as follows: Under the tomcat root directory, for example, if my directory is D:/Apache Software Foundation/Tomcat 5.5, find the web in the conf folder. xml file. remove the following servlet and servlet-mapping element annotations:
Invoker
Org. apache. catalina. servlets. InvokerServlet
...
...
Invoker
/Servlet /*
As you learn more, you will experience the convenience brought by this, but we do not recommend that you do this on enterprise servers. it is limited to the learning stage.
Test servlet. write HelloServlet. java and compile. put HelloServlet. copy class to tomcat home directory/webapps/ROOT/WEB-INF/classes (usually you need to build your own classes folder), in the browser address bar input http: // localhost: port/servlet/HelloServlet (here we can see the convenience of enabling the servlet debugger ).