[Java EE] Information about the Web-inf and Meta-inf folders in eclipse

Source: Internet
Author: User

Web-inf
/web-inf/web.xml
Your Web application configuration file, which is an XML file that describes the servlet and other application component configuration and naming rules;
/web-inf/classes/
This directory contains all the class files used in the site, including the Servlet class and the non-servlet class, which they cannot include in the. jar file.
The storage rules for the class of the site should be executed in accordance with the Java packaging rules. For example, if you have a class named Com.mycompany.mypackage.MyServlet, you should deploy it in the following form:/web-inf/classes/com/mycompany/mypackage/ Myservlet.class;
Placing individual classes (JavaBean and Servlets) by package name structure
/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/
Src=source Source directory, according to the package name structure to place each Java file
/web-inf/database.properties
Database configuration file
# database.properties
Jdbc.drivers = Com.mysql.jdbc.Driver
Jdbc.url = Jdbc:mysql://localhost/ams2
Jdbc.username = root
Jdbc.password = Sh2007ai

# table Define
Ams2.table.dialogue = Content_dialogue
Ams2.table.expansion = Content_expansion_sentence
Ams2.table.vocabulary = Content_vocabulary


/web-inf/tags/
Tag file library, store the customer-defined tag file, the directory is not necessarily tags, users can according to their own preferences and habits for their own tag library name, when using the user-defined tag file library names, users must declare the correct label file library path when using the 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: <%@ taglib prefix= "tags" tagdir= "/web-inf/ Simpletags "% >;
/web-inf/jsp/
File storage locations for the following versions of JSP 1.2. The directory does not have a specific declaration, and the user can be named according to their preferences and habits. This directory is mainly in JSP 1.2 version 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, automatically generated when packaging with jars

[Java EE] Information about the Web-inf and Meta-inf folders in eclipse

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.