InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.8: Administering Web modules (overview) >
6.6.8.5: Administering Web modules with Application Assembly Tool >
6.6.8.5.1: Creating a Web module
6.6.8.5.1: Creating a Web module
Web modules can be created by using property dialog box or by using a
wizard.
The steps for creating a Web module are as follows:
- Click File->New->Web Module. The
navigation pane displays a hierarchical structure used to build the contents
of the module. The icons represent the components, assembly properties,
and files for the module. A property dialog box containing general
information about the module is displayed in the property pane.
- By default, the archive file name and the module display name are the
same. It is recommended that you change the display name in the
property pane. Enter values for other properties as needed. View
the help for 6.6.8.0.a: Assembly properties for Web modules.
- By default, the temporary location of the Web module is
installation_directory/bin. You must specify a new
file name and location by clicking File->Save.
You must first add at least one Web component (servlet or JSP file) before
saving the archive.
- Add Web components (servlets or JSP files) to the module. You must
add at least one Web component. There are several ways of adding
components to a module:
- Import an existing WAR file containing Web components. In the
navigation pane, right-click the Web Components icon and choose
Import. Click Browse to browse the file system
and locate the desired archive file. When the file is located, click
Open. The Web applications in the selected archive file are
displayed. Select a Web application. Its Web components are
displayed in the right window. 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 and the property dialog boxes
are automatically populated with values. Double-click the Web
Components icon to verify that the servlets or JSP files are included in the
module.
- Use a copy-and-paste operation to copy archive files from an existing
module.
- Create a new Web component. Right-click the Web Components icon and
choose New. Enter a component name and choose a component
type. Browse for and select the class files. By default, the
root directory or archive is the current archive. If needed, browse the
file system for the directory or archive where the class files reside.
After you choose a directory or archive, its file structure is
displayed. Expand the structure and locate the files that you
need. Select the file and click OK. In the New Web
Component property dialog box, click OK. Verify that the Web
component has been added to the module (double-click the Web Components icon
in the navigation pane). The Web components are also listed in the top
portion of the property pane. Click the component to view its
corresponding property dialog box in the bottom portion of the pane.
- Enter properties for the Web component as needed. View the help for
6.6.8.0.1: Assembly properties for Web components.
- Enter assembly properties for each Web component. Click the plus
sign (+) next to the component instance to reveal property
groups. Right-click each property group's icon. Choose
New to add new values, or edit existing values in the property
pane.
- 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.
- Optionally, specify assembly property extensions. In the navigation
pane, double-click the icon for Assembly Property Extensions.
- Add any other files needed by the application. In the navigation
pane, click the plus sign (+) next to the Files icon.
Right-click Add Class Files, Add JAR Files, or Add
Resource Files. Choose Add Files. Click
Browse to navigate to the desired directory or archive and then
click Select. If you are adding an entire archive, select
the directory that contains the archive. The directory structure is
displayed in the left pane. Browse the directory structure. From
the right pane, select one or more files to be added and click
Add. If you select a directory and click Add, all
files in the directory, including the directory, are added. Relative
path names are maintained. When the Selected Files window contains the
correct set of files, click OK.
- Click File->Save to save the archive.
Use this wizard to create a Web module. The module can then be used
as a stand-alone application, or it can become part of a J2EE application
containing other modules. A Web module consists of one or more servlets
and JSP files. You can use existing archives (by importing them), or
create new ones.
During creation of the Web module, you specify the files for each servlet
or JSP file to be included in the module. You also specify assembly
properties for the servlets and JSP files, such as references to enterprise
beans and resource connection factories, and security roles. The
content information and assembly properties are used to create a deployment
descriptor.
Before you start the wizard, you must have the required files for your
servlet or JSP file. When the wizard is completed, your Web module (WAR
file) is created in the directory that you specify.
To create a Web module, click the Wizards icon on the tool bar
and then click Web Module. Follow the instructions on each
panel.
On the Specifying Web Module Properties panel:
- Indicate the application to which this module is to be added. If a
parent application is not indicated, the module is created as a stand-alone
application.
- Specify a file name and display name for the module. The display
name is used to identify your module in the Application Assembly Tool and can
be used by other tools. The file name specifies a location on your
system where the WAR file is to be created.
- Provide a short description of the module.
- Click Next.
On the Adding Files panel, specify the files that are to be
assembled for your Web module.
- Click Add Resource Files, Add Class Files, or
Add JAR files, depending on the type of file you are adding.
First, browse for the root directory or archive where the files are located
and click Select. If you are adding an entire archive,
select the directory that contains the archive. The directory structure
is displayed in the left pane. Browse the directory structure.
From the right pane, select one or more files to be added and click
Add. If you select a directory and click Add, all
files in the directory, including the directory, are added. Relative
path names are maintained. The selected files are displayed in the
Selected Files window. Click OK. The files are listed
in a table on the wizard panel.
- If you want to remove a file, select the file in the table and then click
Remove.
- Continue to add or remove files until you have the correct set of
files.
- Click Next.
On the Specifying Optional Web Module Properties panel:
- Indicate whether the module can be installed in a distributable Web
container. The default value is false.
- Specify the full classpath for the Web application.
- Click Next.
On the Choosing Web Module icons panel, specify icons for your
module.
- Specify the full path name of a GIF or JPEG file. The icon must be
16x16 pixels in size.
- Specify a full path name of a GIF or JPEG file. The icon must be
32x32 pixels in size.
- Click Next.
On the Adding Web components panel, add new servlets or JSP
files or import existing ones.
To add a new Web component:
- Click New.
- On the Specifying Web Component Properties panel, specify the
component name and enter values for other properties. View the help for
6.6.8.0.1: Assembly properties for Web components.
- On the Specifying Web Component Type panel, indicate the type
of Web component and specify the servlet class name or JSP file.
- On the Choosing Web Component Icons panel, specify a file
containing a JPEG or GIF image.
- On the Adding Security Role References panel, enter values for
security role references. Click Add to enter a role
name. Click OK. The role name is displayed in the
table on the wizard panel. To remove a role, select the role in the
table and then click Remove. Repeat as necessary.
View the help for 6.6.43.0.3: Assembly properties for security role references. Click Next.
- On the Adding Initialization Parameters panel, enter values for
the Web component's initialization parameters. Click
Add to add a parameter. You must enter a name and
value. Click OK. The parameter is displayed in a
table on the wizard panel. To remove a parameter, select the parameter
and click Remove. Repeat as necessary. View the help
for 6.6.8.0.2: Assembly properties for initialization parameters.
- Click Finish.
To import an existing Web component:
- Click Import.
- Browse the file system to locate the desired archive. The contents
of the archive are displayed in a window. Select the desired component
and then click Add. The components are added to the Selected
Components window. Click OK.
To remove a Web component, select the component name in the table and click
Remove.
When you are finished adding Web components, click Next.
On the Adding Security Roles panel:
- Click Add. Type a role name and, optionally, type a
description. Click OK. The role name is displayed in
a table on the wizard panel. View the help for 6.6.5.0.5: Assembly properties for security roles.
- Continue to add security roles as needed. If you need to remove a
role, select the role in the table and then click Remove.
- Click Next.
On the Adding Servlet Mappings panel:
- Click Add. Enter a URL pattern and select a servlet from
the menu. View the help for 6.6.8.0.11: Assembly properties for servlet mapping. Click OK. The servlet mappings are
displayed in a table on the wizard panel.
- Continue to add and remove URL patterns and corresponding servlets as
needed. If you need to remove mapping, select the entry in the table
and then click Remove.
- Click Next.
On the Adding Resource References panel, enter references for
resource connection factories.
- Click Add to add a reference. You must enter a value for
a name, type, and authorization mode. View the help for 6.6.43.0.2 Assembly properties for resource references. Click OK. The reference is
displayed in the table on the wizard panel.
- To remove a reference, select the reference in the table and then click
Remove.
- Continue to add and remove references as needed.
- Click Next.
On the Adding Context Parameters panel, enter values for context
parameters.
- Click Add to add a parameter. You must enter a name and
value. View the help for 6.6.8.0.8: Assembly properties for context parameters. Click OK. The parameter is
displayed in the table on the wizard panel.
- To remove a parameter, select the parameter and then click
Remove.
- Continue to add and remove parameters as needed.
- Click Next.
On the Adding Error Pages panel, enter values for error
pages.
- Click Add to add a page. You must enter a
location. Then choose Error Code or Error
Exception. Enter a name for the error code or exception.
View the help for 6.6.8.0.9: Assembly properties for error pages. Click OK. The error page is
displayed in the table on the wizard panel.
- To remove an error page, select the item in the table and then click
Remove.
- Continue to add and remove error pages as needed.
- Click Next.
On the Adding MIME Mappings panel, enter values for MIME
mappings.
- Click Add to add a mapping. You must enter an extension
and a MIME type. View the help for 6.6.8.0.10: Assembly properties for MIME mapping. Click OK. The mapping is displayed
in the table on the wizard panel.
- To remove a mapping, select the mapping and then click
Remove.
- Continue to add and remove mappings as needed.
- Click Next.
On the Adding Tag Libraries panel, enter values for tag
libraries.
- Click Add to add a tag library. You must enter a tag
file name and library location. View the help for 6.6.8.0.12: Assembly properties for tag libraries. Click OK. The tag library is
displayed in the table on the wizard panel.
- To remove a tag library, select the library and then click
Remove.
- Continue to add and remove tag libraries as needed.
- Click Next.
On the Adding Welcome Files panel, enter values for welcome
files.
- Click Add. Enter a file name or use the file browser to
locate the file. View the help for 6.6.8.0.13: Assembly properties for welcome files. Click OK. The file name is
displayed in the table on the wizard panel.
- To remove a file, select the file in the table and then click
Remove.
- Continue to add and remove files as needed.
- Click Next.
On the Adding EJB References panel, enter values for EJB
references.
- Click Add to add a reference. You must enter a value for
the name, home interface, remote interface, and type. View the help for
6.6.43.0.1: Assembly properties for EJB references. Click OK. The reference is
displayed in the table on the wizard panel.
- To remove a reference, select the entry in the table and then click
Remove.
- Continue to add and remove references as needed.
Click Finish to complete the wizard. To change settings
for properties, click Back to return to the appropriate
panel. Make any needed changes, and then click
Finish.
After you click Finish, the contents of the archive are
displayed in the Application Assembly Tool window. In the navigation
pane, continue adding or modifying properties as needed. For example,
you can add binding information. When you are finished editing the
archive, click File->Save to save the archive
file.
|
|