struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew O'Haire <>
Subject RE: Forward To Another Action
Date Tue, 02 Oct 2001 04:04:08 GMT
yes, it's very easy...

in your struts-config.xml put a <forward/> tag in your action map, thus:

    <action path="/myAction"
	    <forward name="nextAction" path="/"/>

in your Action code simply return the named forward mapping, thus:

  public ActionForward performAction(ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response)
  throws IOException, ServletException, 
    // implement your action here....
    // Forward control to the specified success URI
    return (mapping.findForward("nextAction"));

-----Original Message-----
From: Jeff Gutierrez []
Sent: Tuesday, October 02, 2001 11:27
To: Struts Mailing List
Subject: Forward To Another Action

Hey guys,

Quick question.. can an action forward to another action?  If so, how can 
I do it?


jeff --

Jeff Gutierrez
Mapua Online!

Pinoy Ako! May reklamo?

View raw message