To create a Struts portlet, you must associate it with an existing
portlet project. Currently, you can only include one Struts portlet per portlet
project. In many cases it will not be necessary to explicitly create a Struts
portlet, because you can add a Struts portlet when you create a Struts portlet
project using the New Portlet Project wizard.
For a portlet project that does not already contain a Struts portlet,
follow these steps to add a Struts portlet to that project:
- In the Web perspective, select . The New Portlet wizard opens.
- Select the target portlet project from the Project list
box. This field will default to the active project in your workspace. Because the portlet is created within the context of a specific project,
any portlet that you create will inherit the API-type and code model capabilities
associated with the project.
- Click the Struts portlet radio button.
- Optionally, click Next to further define
the portlet. If you prefer not to configure additional options, click Finish to
create the portlet.
- To create a portlet that uses the JSP Standard Tag Library tags,
select the JSP Standard Tag Library from the Web
Project features list. For more information about how WebSphere® Portal
supports the use of tags from the JSP Standard Tag Library (JSTL), refer to "Using
JSTL tags in the portal JSPs" in the WebSphere Portal Information Center.
- Supply the appropriate settings in the Portlet Settings page. Click Next.
- Update any Struts portlet-specific settings in the Struts Portlet
Settings page.
- In the Miscellaneous page, specify any additional markups and modes
that you want to enable for the portlet in the project.
- Struts portlets always support html markup. You can add Compact
HTML (chtml) or WML 1.3 (wml)
markup support to the project. These markups are not currently supported
by Rational® Software
Development Platform, but you can manually add the related tag libraries to
use the tags available for the specified markups.
- Select the appropriate check boxes for any additional modes
that you want to enable for the portlet. View mode
is always provided by default.
- Click Finish. The new portlet
is created with a Struts portlet definition in web.xml and portlet.xml. The
J2EE level and WebSphere Portal
version of this portlet is the same level that is associated with WebSphere Portal
v5.1. This version will work with WebSphere Portal v5.0 and v4.x.