Enterprise Explorer view and Web development
The Enterprise Explorer view is the default view in the Web perspective. This view provides the following notable features:
- VCM (version control management) information can be toggled on and off from the Preferences page (
Window | Preferences | Workbench | Label decorations)
- You can drag and drop files from Windows® Explorer or the desktop into the Navigator view.
- View filtering is supported by selecting
Filters from the Navigator view
Menu button. Resources can be filtered by name, project type or content type. Files beginning with a period are filtered out by default.
- The status line shows the full path of the selected resource.
- Dragging a .java file from the Navigator view into a JSP file will insert a usebean tag, the same behavior that is exhibited when a .class file is dragged into a JSP file.
- Errors and warnings on resources (including Java™, HTML/JSP, and Links Builder errors and warnings) are indicated with a red error or yellow warning next to the resource with the error, as well as the parent containers up to the project. This applies for all project types, not only Web projects.
- Items available from the
New cascading menu in the project pop-up menu are context sensitive. All menus will have
Project and
Other options.
Organization of the Enterprise Explorer view
The Enterprise Explorer view shows a custom view of all projects with added J2EE extensions. The following are some of the notable top-level objects that appear beneath the project node (based on default folder names).
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.
Web Site Navigation - Opens Web Site Designer, which is used to specify the site structure as a hierarchy based on the home page. This can be used to automatically create navigation bars in your web pages.
Java Resources - 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 Java Resources folder node. If the project contains multiple source folders, each source folder will appear beneath the Java Resources folder and can be expanded to show their packages and classes.
- 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 Diagram - A Web application diagram, or Web diagram, is a file that helps you visualize and change the flow of a Web application such as a Faces or Struts-based application. This file and associated wizard enables you to construct a diagram of a Web application by clicking on objects in a palette.
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.
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 creation wizard on the Web facet page.
- 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.
Security Editor - Opens the Security Editor, which is used to set and test security in a dynamic Web application. The Security Editor consolidates the security settings in the Web deployment descriptor editors, enabling you to set and modify Web site security from a single interface.