Static content in Struts
Portlet JSPs can link to the static content within the portlet's WAR directory structure using the services of the portlet container to create portlet URIs from which the content can be referenced.
Portlet JSPs cannot link directly to static content within the portlet's WAR directory structure. Instead, they have to use the services of the portlet container to create portlet URIs from which the content can be referenced. Links within static pages (for example, HTML pages) also need to be converted into portlet URIs. The Struts Portlet Framework processes links to static content and converts them to the form of portlet URIs so that linked content is brought back into the portlet and displayed.
Create a Home button for static content
When the Struts Portlet Framework displays static content, it can be difficult to navigate back through a number of screens to a location earlier in the browser history. To overcome this, we can add a homeFromStatic forward to the action mapping which references the static content. This causes a home button to be added to the static content. Pressing the home button causes the link specified by the homeFromStatic forward to be used.
As with any action mapping, it is possible also to use a global forward. Thus, if for all sequences of static pages it was required to use the same link for every home button, one could use a global forward:
<global-forwards> <forward name="homeFromStatic" path="/index.jsp"/> ... </global-forwards>A homeForStatic forward can also be created for a specific ActionMapping:
<action path="/staticpage" type="org.apache.struts.actions.ForwardAction" parameter="/html/view/static.html"> <forward name="homeFromStatic" path="/index.jsp"/> </action>The home button is not only placed on the first static content page, but on all pages generated by links resulting from that page. If no homeFromStatic forward is found with the action mapping which initiated the sequence of static content pages, and there is no global homeFromStatic forward either, the home button is not generated.
Parent Struts Portlet Framework