The role of each folder in the JavaWeb project


/WEB-INF/web.xml

Web application configuration file, which describes the configuration and naming rules for servlets and other application components.

/WEB-INF/classes/

Contains all class files used by the site, including servlet classes and non-servlet classes, they cannot be included in .jar files.

/WEB-INF/lib/

Store various JAR files required by web applications, and place jar files that are only required in this application, such as database-driven jar files.

/WEB-INF/src/

Source directory, place each java file according to the package name structure.

/WEB-INF/database.properties

database configuration file

/WEB-INF/tags/

The custom tag file is stored. This directory is not necessarily tags. You can name your own tag file library according to your own preferences and habits. When using a custom tag file library name, you must declare it correctly when using the tag file. The path to the label file library. For example: when the name of the custom tag file library is simpleTags, when using the tag file in the simpleTags directory, it must be declared in the jsp file header as: <%@ taglibprefix="tags" tagdir="/WEB-INF /simpleTags" %>.

/WEB-INF/jsp/

The file storage location for versions below jsp 1.2. There is no specific declaration for changing the directory. Similarly, you can name it according to your own preferences and habits. This directory mainly stores files of versions below jsp 1.2. In order to distinguish jsp 2.0 files, it is usually named jsp. Of course, you can also name it jspOldEdition.

/WEB-INF/jsp2/

Compared with the jsp file directory, this directory mainly stores files of versions below Jsp 2.0. Of course, it can also be named arbitrarily. It is also named jsp2 to distinguish the file directory of versions below Jsp 1.2.

META-INF

Equivalent to an information package, the files and directories in the directory are recognized and interpreted by the Java 2 platform to configure applications, extensions, class loaders and services

manifest.mf文件,

在用jar打包时自动生成。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325492326&siteId=291194637