Organization of the Project Explorer view
The Project
Explorer view shows a custom view of a dynamic Web project. By default, dynamic
web projects appear under a top-level category called Dynamic Web Projects.
The following are some of the notable top-level objects that appear beneath
the project node (based on default folder names).
Web Diagram - A Web
application diagram, is a file that helps you visualize and change
the flow of a Web application.
This file and associated wizard enables you to construct a diagram of a Web
application by clicking on objects in a palette.
Web Deployment Descriptor -
This file corresponds to the WebContent/WEB-INF/web.xml file, which is used
to specify deployment information for modules created in the Web development
environment. You can edit this file using the Web
deployment descriptor editor, or you can select Open
With from its pop-up menu to open the file with a different
editor.
Underneath the Deployment Descriptor are placeholders object
that are reserved for the creation of Servlets, Servlet Mappings, Filters,
Filter Mappings, References, Security (constraints and roles) and Listeners.
You can create instances of these objects by right clicking on an object and
selecting New from the pop-up menu.
JavaSource - This
node displays Java resources within the project. If the project contains
a single Java source folder, the packages and classes (for example,
servlets, beans) within the source folder will be shown directly beneath the
JavaSource folder node. If the project contains multiple source folders, each
source folder will appear beneath the JavaSource folder and can be expanded
to show their packages and classes.
Note: Though the default name given
to the folder is JavaSource, you can change the name in the Preferences page
by selecting .
- Libraries - This folder contains the library JAR files defined
in the project properties. Three types of JAR files are shown:
- JAR files included in the project's WebContent/WEB-INF/lib directory
- JAR files external to the project, such as j2ee.jar and rt.jar
- Project libraries, which are special references to a Java project
When a Web project is exported, a JAR file is automatically created
from the Java project to be used by the Web application during
runtime. Libraries are shown in classpath order. By default, only the JAR
files contained within the project are shown. You can also display external
JARs and project libraries by selecting Show Referenced Libraries from
the Navigator view's Menu button
.
- imported_classes folder - This folder can be created during a WAR
import, and contains class files that do not have accompanying source. The imported_classes folder
is a Java classes
folder; Java classes folders can also be created using the
Web project Java Build Path properties page.
You can drag
and drop class files from the Windows Explorer or desktop to the imported_classes folder
in the Navigator view.
Web content folder - This folder contains items to be published
to the server. By default, this folder will be named
WebContent for
newly created static and dynamic Web projects.
Note: You can change the name
in the Web page of the project's Properties dialog. In a dynamic Web project,
changing the folder name will update the Java build output directory. You can change
the preference for the default folder name to be applied when creating new
Web projects by selecting .
- META-INF - This directory contains the MANIFEST.MF file,
which is used to map class paths for dependent JAR files that exist in other
projects in the same Enterprise Application project. An entry in this file
will update the run-time project class path and Java build settings to include the referenced
JAR files.
- Theme - The suggested directory for cascading style sheets and
other style-related objects.
- WEB-INF - The directory where supporting Web resources for a Web
application are kept (for example: .xmi files, .xml files, and web.xml.) Note
that double-clicking on the web.xml file has the same effect as double-clicking
on the Deployment Descriptor: it opens the Web Deployment Descriptor editor.