Project Explorer view and Web development

The Project Explorer view is customized for Web developers as an alternative to the Resource perspective's Navigator view. The Project Explorer view is the default view in the Web perspective.

All operations available within the Resource perspective's Navigator view are also available in the Project Explorer view through Workbench or pop-up menus. The following notable features are available in the Project Explorer view:

 

Organization of the Project Explorer view

The Project Explorer view shows a custom view of a dynamic Web project. The following are some of the notable top-level objects that appear beneath the project node (based on default folder names):

Web Site Navigation - This configuration file only exists if you choose to use the Web Site Designer feature (a default setting) when you create a Web project. Double-click this file to open the Web Site Designer, which includes a navigation view and a details view.

Web Deployment Descriptor - This file corresponds to the WebContent/WEB-INF/web.xml file. You can double-click to open the file in the deployment descriptor editor, or 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.

Web Diagram - This file and associated wizard enables you to construct a diagram of a Web application by clicking on objects in a palette.

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 Java JavaSource folder and can be expanded to show their packages and classes. A default folder named gen/src is created when you create a Web project.

Note: Though the default name given to the folder is JavaSource, you can change the name in the Preferences page by selecting Window > Preferences > Web Tools > New J2EE Project.

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 Window > Preferences > Web Tools > New J2EE Project.

 

Related concepts

The Web deployment descriptor editor