| java.lang.Object org.apache.struts.action.Action org.apache.struts.tiles.actions.DefinitionDispatcherAction
DefinitionDispatcherAction | public class DefinitionDispatcherAction extends Action (Code) | | An Action that dispatches to a Tiles Definition
that is named by the request parameter whose name is specified
by the parameter property of the corresponding
ActionMapping.
This action is useful in following situations:
To associate an Url to a definition
To use Struts <html:link> tag on a definition
To configure the use of this action in your
struts-config.xml file, create an entry like this:
<action path="/saveSubscription"
type="org.apache.struts.tiles.actions.DefinitionDispatcherAction"
parameter="def"/>
<forward name="success" path="anything" //>
<forward name="error" path="path.to.error.page" //>
which will use the value of the request parameter named "def"
to pick the appropriate definition name.
The value for success doesn't matter. The forward will forward to
appropriate definition.
The value for error should denote a valid jsp path or definition name.
version: $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $ |
Field Summary | |
protected static Log | log Commons Logging instance. |
log | protected static Log log(Code) | | Commons Logging instance.
|
execute | public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code) | | Process the specified HTTP request, and create the corresponding HTTP
response (or forward to another web component that will create it),
with provision for handling exceptions thrown by the business logic.
Parameters: mapping - The ActionMapping used to select this instance Parameters: form - The optional ActionForm bean for this request (if any) Parameters: request - The HTTP request we are processing Parameters: response - The HTTP response we are creating exception: Exception - if the application business logic throwsan exception since: Struts 1.1 |
Methods inherited from org.apache.struts.action.Action | protected void addErrors(HttpServletRequest request, ActionMessages errors)(Code)(Java Doc) protected void addMessages(HttpServletRequest request, ActionMessages messages)(Code)(Java Doc) public ActionForward execute(ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response) throws Exception(Code)(Java Doc) public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc) protected String generateToken(HttpServletRequest request)(Code)(Java Doc) protected ActionMessages getErrors(HttpServletRequest request)(Code)(Java Doc) protected Locale getLocale(HttpServletRequest request)(Code)(Java Doc) protected ActionMessages getMessages(HttpServletRequest request)(Code)(Java Doc) protected MessageResources getResources(HttpServletRequest request)(Code)(Java Doc) protected MessageResources getResources(HttpServletRequest request, String key)(Code)(Java Doc) public ActionServlet getServlet()(Code)(Java Doc) protected boolean isCancelled(HttpServletRequest request)(Code)(Java Doc) protected boolean isTokenValid(HttpServletRequest request)(Code)(Java Doc) protected boolean isTokenValid(HttpServletRequest request, boolean reset)(Code)(Java Doc) protected void resetToken(HttpServletRequest request)(Code)(Java Doc) protected void saveErrors(HttpServletRequest request, ActionMessages errors)(Code)(Java Doc) protected void saveErrors(HttpSession session, ActionMessages errors)(Code)(Java Doc) protected void saveMessages(HttpServletRequest request, ActionMessages messages)(Code)(Java Doc) protected void saveMessages(HttpSession session, ActionMessages messages)(Code)(Java Doc) protected void saveToken(HttpServletRequest request)(Code)(Java Doc) protected void setLocale(HttpServletRequest request, Locale locale)(Code)(Java Doc) public void setServlet(ActionServlet servlet)(Code)(Java Doc)
|
|
|