In struts you can redirect(not forward) to other page or site.

In your action instead of mapping.findforward use following code

   ActionForward toAction= new ActionForward ();
   ActionForward fromAction = mapping.findForward("targetURL");
   toAction.setPath(fromAction.getPath());
   toAction.setRedirect(true);
   return toAction;

Please note targetURL is defined in your struts config file.
The above code acts as redirect and not as forward.
Also you can add queryStrings to URL (if required).

Please write me if you need any addtional info.

Michael Oliver wrote:

I would like to forward the user out of struts to a URL after an action
executes without additional user input, what is the best way in Struts?
I can use a page that has a redirect javascript in it, but is there a
facility in Struts to do this?



Michael Oliver

CTO

Alarius Systems LLC

3325 N. Nellis Blvd, #1

Las Vegas, NV 89115

Phone:(702)643-7425

Fax:(520)844-1036

*Note new email changed from [EMAIL PROTECTED]








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to