Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below is the init-param elements that you can set up in portlet.xml for configuring the portlet mode -> xwork namespace mappings for the portlet. Basically, you can think of the different portlet modes as different sub-applications, so it can be useful to set up the actionstruts.xml configuration with different namespaces for the different portlets and modes:

...

  • If the Action is executed in the render phase, it will perform a PortletRequestDispatcher.include(req, res) to the resource specified in the location attribute.
  • If the Action is executed in the event phase, and the result is an action mapping, it will set a render parameter on the ActionResponse to indicate which Action should be executed in the render phase. This follows good web application design, which promotes the use of a redirect after an event, which in this case means that an Action executed in the event phase will be followed by a redirect to an Action executed in the render phase.
  • If the Action is executed in the event phase, and the result is not an action mapping, the esult result will prepare a special Action called "renderDirect" (specified in the webwork-portlet-default package) whose sole purpose is to render the specified web resource (usually a JSP).

...