Several concepts of Javaweb and the Tomcat directory structure
First, the concept of Javaweb application:
In the Sun's Java Servlet specification, Java Web applications are defined as "Java Web applications are composed of a set of Servlets, HTML pages, classes, and other resources that can be bound ." It can be run in a servlet container that implements a servlet specification from a variety of vendors.
Java Web Apps can include the following:
--Servlet
--JSP
--Practical class
-static documents such as HTML, pictures, etc.
--Description of Web application information (XML)
Second, the concept of the servlet container:
The ①servlet container provides a runtime environment for Javaweb applications, which manages the life cycle of Servlets and JSPs and manages their shared data.
②servlet containers are also known as Javaweb application containers, or servlet/jsp containers
③ currently the most popular servlet container software includes:
--Tomcat
--Resin
--a built-in servlet container is also available in a Java EE server (such as WebLogic)
III. directory Structure of Tomcat
--bin function: A script file that holds the startup and shutdown Tomcat
--Conf effect: Various configuration files for the Tomcat server
--lib role: Store the Tomcat server and the jar files that all Web applications need to access
--Logs function: Log file for tomcat storage
--Temp action: Storing temporary files generated by Tomcat runtime
--WebApps Effect: When publishing a Web application, you typically put the Web application's directory and files in this directory
--Work function: Tomcat places JSP-generated servlet source files and bytecode files in this directory
IV. directory structure developed by Javaweb
① A Web application is a complete application of a set of Servlets, HTML pages, classes, and other resources running on a Web server that exists in a structured, hierarchical directory
② these files that make up a Web application are deployed in the appropriate directory hierarchy, and the root directory represents the "root" of the entire Web application
③ usually put the directory of the Web application in the WebApps directory, each subdirectory in the WebApps directory is a standalone Web application, the name of the subdirectory is the name of the Web application, which is the "root" of the Web application. Users access resources in a Web application through the root of the Web application
The directory hierarchy of the Web application is defined in the servlet specification:
-webcontent role: The root directory of the Web application, all files belonging to this Web application exist under this directory
-web-inf role: The deployment descriptor file that holds the WEB application. xml
-classes role: Storing Servlets and other useful class files
-lib role: Store the jar files that the Web application needs to use, which can contain servlets, beans, and other useful class files
-web.xml role: Contains configuration and deployment information for Web applications
HTML page
JSP page
...
Several concepts of Javaweb and the Tomcat directory structure and the directory structure of Web development