Struts Portlet Framework
Struts is a popular open source project for implementing Web applications using a Model-View-Controller design pattern. Struts has an active development community and continues to evolve. The user community is equally active and many Web applications have been implemented using Struts. The Struts framework can be used to effectively design the Web application. The framework supports both large or small development teams as well as organizations that need to split the development work between specialists (for example, between user interface designers and programmers). The reasons that Struts has became popular for the servlet environment apply for portlets as well. This document introduces the Struts Portlet Framework, which adds support for writing Struts applications that can be deployed in WebSphere Portal.
Developers that have worked with Struts in the servlet environment should adapt easily to the Struts Portlet Framework. The packaging of a Struts portlet application is very similar to a Struts application in the servlet environment. However, WebSphere Portal also introduces additional concepts, such as portlet modes, multiple device support, and portlet communication, that might need to be addressed by the Struts application. This document provides information about special considerations when developing Struts applications for the portlet environment.
For more detailed information, you can find numerous sources available about Struts. The Struts Web site offers resources for developers, including a User Guide, informative JavaDoc, and the source code. There are also several excellent books on Struts that are referenced from the Struts Web Site. These references describe in detail the aspects of designing and implementing a Web application using Struts. For more information about Struts, see the Struts Application Framework at:
http://jakarta.apache.org/struts/The following subtopics describe the development of Struts applications in the portal environment.
- Changes to Struts application code
- Changes to Struts JSPs
- Changes to configuration files
- Create link tags in Struts
- Formatting XML documents with XSLT
- Static content in Struts
- Migrate existing Struts applications
The Struts Portlet Framework ships several example WAR files, including source code, that demonstrate how to implement a Struts application in WebSphere Portal and also how to exploit portal features, such as portlet modes and device support. Throughout this documentation, source code from PortalStrutsExample.war is used to demonstrate the changes necessary to enable a Struts Web application to be deployed and run as a portlet. These example files are located in the wp_root/dev/struts directory. For more information, see Struts Demo.
See also
- The Struts Application Framework
- Cooperative portlets
- Portlet API
- Portlet development basics
- Page sequences