Create a more complex directory hierarchy under the root directory. Simple applications can simply be placed in the root directory by these files.
The/web-inf/web.xml:web.xml file is used to configure the Web program, which is called the Web application Deployment descriptor (Web application Deployment desicription). He is an XML document that describes the attributes of the servlet and other Web application components and their initial parameters.
/web-inf/classes: This subdirectory is used to store all Java class files and related resource files, such as pictures, language information, and so on. These class files may be servlet, or they may be ordinary Java classes. It should be noted that if a class file belongs to a package (package), the entire directory hierarchy needs to be placed in the classes directory.
/web-inf/lib: This subdirectory is used to store all the library files required by the Web application, stored in a compressed. jar file format that contains the class files and corresponding resource files required by all Web applications. For example, an E-commerce application needs to access Oracle, and the JDBC driver library files that will be used are placed in the Lib directory.