In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the documents of the java web project". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the documents of the java web project"?
Src folder
This folder is used to store the source code of the back-end project. For example, the backend servlet, the JavaBean class that needs to be used, and the java class responsible for business logic and the java class responsible for database operation (this folder is not directly related to running, and the corresponding java code needs to be compiled and placed under the classes folder before it can be used in the project).
Webapp folder
This folder is the main folder of the project. Put this folder in the webapps folder of Tomcat and you will be able to access the corresponding web project after Tomcat starts.
Jsp files are usually stored in this folder. Jsp files are used for view rendering in java web (for more information, please go to MVC mode to learn and learn)
WEB-INF folder
The compiled class file (in the classes folder) and the web.xml file are stored in it
Web.xml file
This file is the project deployment file, which specifies the one-to-one mapping between servlet and url, as well as some other configuration files.
Compile and deploy
According to the above introduction, you only need to compile the java code in the src folder and put it into the classes folder, then put the webapp folder into the Tomcat webapps folder and start Tomcat. (for the use of Tomcat, please refer to this article in the editor: how to install and configure the Java back-end server Tomcat? ).
test
First of all, according to the above, you can get the path of Tomcat to http://localhost:8080/, and the webapp folder of the editor is renamed to web and placed under the folder of webapps, so the path of the application of the editor is: http://localhost:8080/web/, and you can see the index page of the project by visiting this path. You can then use the actions of HTML to test whether the function of servlet is performing properly.
At this point, I believe you have a deeper understanding of "what documents are there in the java web project?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.