WebSphere Portal
Struts Portlet Framework examples
The Struts Portlet Framework in WebSphere Portal includes two example Struts applications that allow you to explore the support of Struts in WebSphere Portal.
- PortalStrutsBlank.war
This is the starting point for creating Struts applications using the Struts Portlet Framework. This package includes all of the files needed for developing the Struts application, include the jar files, TLDs and xml files.
- PortalStrutsExample.war
Demonstrates the integration of a basic Struts application into WebSphere Portal. It contains the Struts example application with some enhancements, including support for help mode and devices that support WML markup. This portlet has a predefined user password definition for user=user and password=pass. You may create other accounts if desired.
- Tiles.war
Demonstrates how to implement a Struts application that uses Tiles in the Struts Portlet Framework. The struts configuration includes the plugin for the Portal implementation of the Tiles request processor.
- FileUpload.war
Demonstrates how to use the html:file tag and the FileUpload classes. The example also shows how to specify the max file size and will not upload a file larger than 200K.
- MultiStrutsApps.war
Demonstrates how to implement a Web application that creates several concrete portlets in portlet.xml. This sample maps Struts modules to portlets and uses portlet configuration parameters to specify each portlet's welcome file. The application also demonstrates messaging between the portlets. The edit mode support is also included in the sample, demonstrating the technique to remove an IViewCommand on a mode change.
You can modify the files included in the examples to create your own Struts portlets.
Related information