Deployment structure for Web projects

Source: Internet
Author: User

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

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.