Struts Portlet Framework

 

+

Search Tips   |   Advanced Search

 

The Struts Portlet Framework (SPF) is a WebSphere® Portal specific framework built on top of the Struts framework contributed by Apache as part of the Jakarta project. Rational® tools provide Struts development tools for both Web applications and portlet applications. The primary goal of SPF is to enable Struts programmers to easily create portlets based on Struts conventions without requiring a great deal of knowledge about portlets.

SPF provides modified TLD files so that appropriate classes can be referenced within the portlet JSP files. The implementation of these classes resides in additional JAR files included in SPF. Depending on whether the application is running in a Portal or standard Web application environment, the classes determine whether to use portlet-based Struts code or standard Struts code.

In the Websphere Portal V6.0 distribution of SPF, all of the tld files are now contained in the file...

wps.struts.tlds.common.jar.file

Reference these in the JSP as follow:

<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>

<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

These taglibs will be added for you automatically when you use the Web Page wizard in a Struts portlet project containing WebSphere Portal Server V6.0 SPF. For adding additional taglibs, you can use the Import Custom menu option to select the tld's available in the Page Designer's JSP.

Note: Struts tags should render in Page Designer the same way in both environments.

Due to a unique namespace requirement, ensure that Apache's JavaScript in your JSP files refer to forms in their own unique namespace. To simplify this process, an additional attribute, validate, is provided for <html:form> and <html:link>. Instead of using: onSubmit="validateActionForm()", you should set the attribute validate to "true".

For a full description of the Struts Portlet Framework and details about implementing the framework in the WebSphere Portal environment, see the WebSphere Portal Information Center.

 

Related concepts

Generating Struts portlet actions and action mapping codes

Struts portlet applications

Creating Struts portlets and projects

Creating data access Web applications using Struts

 

Related tasks

Creating Struts portlet projects

Creating portlets

Creating Struts portlet JSP files

Creating Struts applications

 

Related reference

Differences between Struts 1.1 and SPF tag library classes