The role of the "Java" Web-inf directory and the Meta-inf directory

Source: Internet
Author: User

/web-inf/web.xml

A Web application configuration file that describes the servlet and other application component configuration and naming conventions.

/web-inf/classes/
Contains all of the site's class files, including the Servlet class and the non-servlet class, which they cannot include in the. jar file.
/web-inf/lib/
Store the various jar files required by your web app to place the jar files that are required only in this application, such as database-driven jar files.

/web-inf/src/
Source directory, according to the package name structure to place each Java file.

/web-inf/database.properties
Database configuration file

/web-inf/tags/

A custom label file is stored, which is not necessarily tags, you can name your own tag library according to your preferences and habits, and when you use a custom tag file library name, you must declare the correct label vault path when using a tag file. For example: When the custom label file library name is Simpletags, when you use a label file in the Simpletags directory, you must declare the JSP file header as: <%@ taglibprefix= "tags" tagdir= "/web-inf/ Simpletags "% >.

/web-inf/jsp/

File storage locations for the following versions of JSP 1.2. There is no specific declaration on the directory, so you can name it according to your preferences and habits. This directory is primarily for JSP 1.2 versions of the file, in order to differentiate JSP 2.0 files, usually use JSP name, of course you can also name jspoldedition.

/web-inf/jsp2/

Compared with the JSP file directory, the directory is mainly under the JSP 2.0 version of the file, of course, it can be arbitrarily named, but also to distinguish between JSP 1.2 versions of the file directory, usually named JSP2.

Meta-inf

Equivalent to a packet, the files and directories in the directory are recognized and interpreted by the Java 2 platform to configure applications, extenders, ClassLoader, and services
MANIFEST.MF files, which are generated automatically when packaged with jars.

http://blog.csdn.net/saygoodbyetoyou/article/details/16899395

Java web-inf directory and Meta-inf directory function

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.