The Tomcat/webapps directory is used to store Java projects. Each folder is a project, and by default this directory already has four items, all from Tomcat.
Where Root is the main project of Tomcat that we accessed when we tested Tomcat. To create our own projects, we will follow the Java EE directory structure rules.
Example of a Hello project:
Hello project name, must have, create a new folder named Hello under WebApps
|----------Store Web resources (such as JSP,HTML,CSS, etc.), such as creating a new Hello.xml
|----------Web-inf must have, and must be capitalized. files in this directory are protected and cannot be accessed directly
|---------Web. XML must have a configuration file
|----------Classes store Java class-edited. class files
|----------Lib to store third-party dependency packages that need to be introduced
To access the project:
1) Start Tomcat
2) Visit: http://localhost:8080/hello/hello.html
If it is a static page, do not need to restart Tomcat, dynamic page, such as JSP will need to restart Tomcat, re-compile operation
Deployment structure for Web projects