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.
Before you begin
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.Why and when to perform this task
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.
Steps for this task
Result
A 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.What to do next
You can now begin creating or importing content for your Web project using the New File wizards or the Import wizards available from the File menu or from the popup menu for the Web module. For example, right-click the Web module, click Import > WAR file and specify the WAR file to import.Related concepts
Web applications
Web modules
Enterprise (J2EE) applications
Related tasks
Assembling applications
Assembling Web applications
Related information
Importing WAR files