Java – we put servlets in Tomcat’s directory structure?
•
Java
I copied a helloservlet application from the web and put it in the root folder
Solution
This document can help you
http://tomcat.apache.org/tomcat-7.0-doc/appdev/deployment.html
/WEB-INF / classes / – this directory contains any Java class files (and related resources) required by the application, including servlet and non servlet classes, which are not combined into jar files If your classes are organized into Java packages, they must be reflected in the directory hierarchy under / Web - inf / classes / For example, the name is com mycompany. mypackage. The Java class of myservlet needs to be stored in / WEB-INF / classes / COM / mycompany / mypackage / myservlet Class
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码