Web applications are Java 2 Platform, Enterprise Edition (J2EE) applications that can be deployed onto an application server. Web applications are projects comprised of one or more related servlets, JavaServer Pages technology (JSP files), and Hyper Text Markup Language (HTML) files that you can manage as a unit. Web applications are called WAR files because enterprise application projects are stored in Web application archive (WAR) files.
This article assumes that you have created and unit tested Servlets, JavaServer Pages (JSP) files and other Web components that you want to assemble in an enterprise application and deploy onto an application server.
In the Application Server Toolkit (AST) and Rational Web Developer assembly tools, you create and maintain resources for Web applications in Web projects. There are two types of Web projects, dynamic and static. Dynamic web projects can contain dynamic J2EE resources such as servlets, JSP files, filters, and associated metadata, in addition to static resources such as images and HTML files. Static Web projects only contain static resources.
Dynamic Web projects are always embedded in enterprise application projects. Creating a Web project in an assembly tool requires that an enterprise application (EAR) project exist, or the assembly tool creates one for you. Creating a Web project updates the application.xml deployment descriptor of the specified enterprise application project to define the Web project as a module element. If you are importing a WAR file rather than creating a Web project anew, the WAR Import wizard requires that you specify a Web project, which already requires an EAR project.
This article describes how to create a dynamic Web project using an assembly tool. For instructions on how to create a static Web project, see the Application Server Toolkit or Rational Web Developer online help, or the Application Server Toolkit information center that accompanies this information center.
Note: If you want to add a Web project as a module to another enterprise application project in the future, open the application.xml editor for the enterprise application project and select Add on the General page.
Note: You can change the context root after you create a project using the project Properties dialog, which you access from the project context menu.
ResultA new Web project is created, reflecting the J2EE folder structure that specifies the location of Web content files, class files, class paths, the deployment descriptor, and supporting metadata. Files for the Web project are shown in the Project Explorer view under Enterprise Applications and Dynamic Web Modules .
Related concepts
Web applications
Web modules
Enterprise (J2EE) applications
Related tasks
Assembling applications
Assembling Web applications
Related information
Importing WAR files