Run servlet under Tomcat!

xiaoxiao2021-03-06  61

There is a new problem! The new Tomcat is newly installed, and the directory Source is created under Tomcat / conf / server.xml, add < / Context> OK, run http: // localhost: 8080 / source / index.jsp, success. Next, I wrote a servlet, put it in Source / Web-INF / CLASSES / Under, run http: // localhost: 8080 / source / servlet / helloWorld always report 404, add < Servlet> HelloWorld HelloWorld But, is still 404. Later Solution: Web.xml Add HelloWorld / sertern> This solved. I don't know why. Then, if all servlets, I want to add / servlet / * I can once.

转载请注明原文地址:https://www.9cbs.com/read-88474.html

New Post(0)