Tomcat directory structure:
1. First Level Catalogue
Bin--tomcat executing the script directory
Conf--tomcat configuration file
Lib--tomcat running the required library files (JARS)
Logs--tomcat log file at execution time
Temp--tomcat Temporary File storage directory
Webapps--tomcat's main Web publishing directory (store our own Jsp,servlet, Class)
Work--tomcat's working directory, Tomcat will translate the JSP file into the Java file and the class file here.
2. Level two directory (only a few important files are listed in the first level directory)
(1) file in Bin directory
Catalina.sh for starting and shutting down the Tomcat server
configtest.sh for checking configuration files
Startup.sh launching the Tomcat script
shutdown.sh Close Tomcat Script
(2) files under the Conf directory
Server.xml Tomcat Global configuration file
Web. XML sets default files for different tomcat-configured websites
Tomcat-users.xml Tomcat User-certified configuration file
(3) files in Lib directory
Contains a variety of jar files used by Tomcat.
(4) files under the logs directory
Localhost_access_log.2013-09-18.txt Access Log
Localhost.2013-09-18.log Errors and other logs
Manager.2013-09-18.log Management Log
Catalina.2013-09-18.log Tomcat to start or close log files
(5) files under the WebApps directory
Programs with Web Apps (JSP, servlet, JavaBean, etc.)
(6) files under the work directory
Automatically generated by Tomcat, which is where Tomcat places the intermediate (intermediate) files (such as compiled JSP files) during its run. If you delete this directory when Tomcat is running, you will not be able to execute the page that contains the JSP.
3. Level Three directory (only for directories or files under Level two directory WebApps)
The second-level directory WebApps, which primarily hosts Web applications. The Tomcat Web application should consist of the following directories:
(1). page content and other files storage location: *.html, *.jsp, etc. can have many directory levels, by the user's site structure, the implementation of the function should be the interface of the site, that is, the user's main visible part. In addition to HTML files, JSP files, there are JS (JavaScript) files and CSS (style sheet) files, as well as other multimedia files.
(2). Web-inf/web.xml This is a description file for a Web application. This file is an XML file that describes the servlet and other component information for this Web application, including some initialization information and security constraints, and so on.
(3). Web-inf/classes/this directory and its subdirectories should include all compiled Java class files (*.class) files, such as all JavaBean and servlets for this Web application, as well as those that have not been compressed into the jar package His class files and related resources. Note that the Java class in this directory should organize the directory according to the package hierarchy to which it belongs (that is, if the *.class file has a package definition, the *.class file should be placed under the. \web-inf\classes\ package name).
(4). Usually web-inf/classes/the class file in this directory can also be packaged into a jar file, and can be placed in the Web-inf under the Lib directory. Package each *.class file in the classes directory as a Webmis.jar file (jar CVF Webmis.jar * *)
Description
? The Web-inf directory contains the resources used by the application, but Web-inf is not in the public document root directory. The files contained in this directory cannot be accessed by the client.
? The class directory (under Web-inf) contains classes such as the Servlets,beans that are required to run the Web application.
? The Lib directory (under Web-inf) package contains *.jar files for Java archive files (JARs), such as tag libraries or Servlets,beans classes.
? If a class appears in the jar file and also appears in the directory of the class, the ClassLoader loads the one that is located in the class directory.
(5). common/lib/This directory contains all the class files and related files that are compressed into the jar file. For example: Java library files provided by third parties, JDBC drivers, etc.
? Where Msbase.jar, Mssqlserver.jar, msutil.jar files are SqlServer2000 jdbc drivers
? The package where Servlet-api.jar and Jsp-api.jar are the APIs for Servlets and JSPs
tomcat--directory Structure