What version of Struts are you using? ActionRedirect from Struts 1.2.7 makes it easy to do what you want. On prior Struts releases, I think you can do something like:

  ActionForward fwd = new ActionForward(mapping.findForward("searchForm"));
  fwd.setPath(fwd.getPath() + "searchMode=searchFlights&err-no=5");
  return fwd;

L.

Nilesh M Sampat wrote:

Hello,

Here is what I am trying to do. Could you please help me?

I have one search form 'searchForm'
<forward name="searchForm" path="/searchform.do" redirect="true"/>

<action path="/searchform" type="com.waves.v5.SearchformAction" parameter=".frontpage" />

this form is customised for Holidays and Flights based on a
parameter sent..

when submitted it goes to
<action path="/search" type="com.waves.v5.SearchAction"
        parameter=".frontpage.mc.pkgAvail" />

SearchAction is again a common commponent serving searching
for flights or holidays based on information passed in
parameters and stored in session.

however, in SearchAction if I don't receive any results of
my query I would like to forward (redirect) to search form
based on parameter flights or holidays...

will I be able to pass parameters to a global forward e.g.

searchform.do?searchMode=searchFlights&err-no=5

searchMode and err-no are generated in SearchformAction.java
and I need to pass this dynamically to the global forward
searchForm.
I use the following for the forward
return mapping.findForward("searchForm") ;

How do I do this?

your help will be appreciated.

thanks in advance for your help.

Kind regards,

Nilesh




--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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

Reply via email to