Web-inf directory and the role of the Meta-inf directory

Source: Internet
Author: User



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

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.
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.

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

Database configuration file


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 "% >.


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.


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.


The so-called Meta-inf, plainly is to store some meta-information related files such a folder, generally try not to manually place files to this folder. How do you understand this sentence? This means that the folder should be seen as an internal meta-directory of Java engineering, so the files in this directory should be built as build tools. Our own files should be placed directly in the root directory or in other subdirectories.

According to the official Jar file specification (), a typical Meta-inf directory may contain the following files or subdirectories:

    • MANIFEST. Mf
    • X.sf
    • X.dsa
    • services/

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.

Web-inf directory and the role of the Meta-inf directory

Related Article

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.