Assembling Web Modules
If you want to use existing J2EE 1.2 Web modules in your J2EE 1.3 application, migrate them to J2EE 1.3 first.
Assemble a Web module to contain servlets, JSP files, and related code artifacts. Group(enterprise beans, client code, and resource adapter code in separate modules).
A Web module can be installed as a stand-alone application or can be combined with other modules into an enterprise application.
The Application Assembly Tool (AAT) provides flexibility in assembling Web modules. Options described below include:
- Importing an existing Web module (WAR file)
- Creating a new Web module
- Copying code artifacts (such as servlets) from one Web module into a new Web module
Although you can input various properties for Web archives, available properties are specific to the Servlet, JSP, and J2EE specification level.
- Start the AAT.
- From the New tab, select Web Module. Click OK. The navigation tree now displays various sets of properties for configuring the new Web module.
- (Optional) Use the property dialog shown in the AAT workspace to change the default file name and location.
- It is recommended that you change the display name so that it differs from the file name.
- If you like, change the temporary location of the Web module from the default location, $WAS_HOME/bin.
- Add at least one Web component servlet(or JSP file) to the module. You must add at least one Web component, using one of the following methods.
- Import an existing WAR file containing Web components.
- In the navigation tree, right-click the Web Components folder.
- Select Import from its right-click menu.
- Use the file browser to locate and select the archive file for the module.
- Click Open. The Webapps in the selected archive are displayed.
- Select a Webapp. Its Web components are displayed in the workspace.
- Select the servlets or JSP files to be added and click Add. The components are displayed in the Selected Components window.
- Click OK. The properties associated with the archive are also imported. The property dialog boxes in the workspace are populated automatically with values.
- Double-click the Web Components icon to verify that the servlets or JSP files are included in the module.
- Double-click the Web Components icon to verify that the servlets or JSP files are included in the module.
- Save the Web module.
- Copy and paste archive files from an existing module into the new Web component.
- Create a new Web component.
- In the navigation tree, right-click the Web Components folder.
- Select New from its right-click menu.
- When the new module is displayed, enter a component name and choose a component type.
- Use the file browser to locate and select the archive file for the module.
- Click the plus sign (+) to verify its contents and enter assembly properties.
- In the New Web Component property dialog box, click OK.
- Verify that the Web component has been added to the module by double-clicking the Web components icon in the navigation tree.
- Click the component to view its corresponding property dialog box in the bottom portion of the pane.
- Enter assembly properties for each Web component.
- Click the plus sign (+) next to the each component to reveal its property groups.
- Right-click each property group icon and click New to display properties in the workspace.
- Specify additional properties for the Web module.
Right-click each property group's icon. Choose New to add new values, or edit existing values in the property pane. (Click Help for descriptions of the settings).
Note that if you add a security constraint, add at least one Web resource collection.
- Add any other files needed by the application.
- In the navigation tree, click the plus sign (+) next to the Files icon. Right-click Add Class Files, Add JAR Files, or Add Resource Files. Select Add Files.
- Add files, using the Add Files dialog.
- Save the application.
What to do next
Assemble other new modules of your choice, if needed:
- Assembling EJB modules.
- Assembling application client modules.
- Assembling resource adapter modules.
One can also migrate existing modules.
Another option is to proceed directly to assembling a new application module. While assembling an application module, you can create any new modules that you need.
Web modules
Webapps
JSP files
Page lists
Application lifecycle listeners and events
Servlet filtering
Servlets
Client type detection support
Tag libraries
Context parameters
Security constraints
Servlet mappings
Invoker attributes
Error pages
File serving
Servlet caching
Web components
Web property extensions
Web resource collections
Welcome files
Context parameter assembly settings
Initialization parameter assembly settings
Filter assembly settings
JSP attribute assembly settings
Multipurpose Internet Mail Extensions (MIME) filter assembly settings
Page list assembly settings
Security constraint assembly settings
Servlet mapping assembly settings
Tag library assembly settings
Welcome file assembly settings
Servlet caching configuration assembly settings
Web components assembly settings
Web modules assembly settings
Assembly property extensions
File serving attribute assembly settings
Invoker attribute assembly settings
Error page assembly settings
Web resource collections security constraint properties
Webapps: Links
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.