Open the servlet debugger and run the servlet without modifying the web. xml file.

Source: Internet
Author: User
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 ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.