What about having an action mapping like this: <action path="/initialWhateverActionThatWas" forward="/whateverActionThatWas.do?type=initial" />
or maybe (better?) in your original action mapping just a forward for each one like: <action ... <forward name="successInitial" path="/public/registerSuccess.html?type=initial"/> <forward name="successNext" path="/public/registerSuccess.html?type=next"/> </action> -Jonathan ----- Original Message ----- From: "Alex Paransky" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 17, 2002 11:37 AM Subject: RE: Forwarding from a FormAction with parameters... > I understand what you are saying, but then sometime the value is in the > parameters, and sometimes in the request. > > I basically have a page with two modes of operation. When I pass > ?type=initial to the page it behaves in a certain way. There is a link on > the page to take it into a second mode. The second mode, ?type=next, adds > extra controls on the page and allows user to edit data on a form. After > user hits the submit button, I need to get back to the ?type=initial state > (if all is ok). I need to pass this ?type=initial back to the page. But, > if I include it in the request, the semantics of getting the data is > different (sometimes as a parameter, other times in the request). > > Another suggestion was to hardcode it in the action, but I am trying to > avoid that, giving the flexibility to change to a different page without > having to alter code. > > By the way, I have remapped my .html to be processed by the .jsp compiler, > so the .html extensions are jsp pages. > > Thanks. > > -AP_ > www: http://www.alexparansky.com > > -----Original Message----- > From: Tom Goemaes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 17, 2002 1:44 AM > To: Struts Users Mailing List; [EMAIL PROTECTED] > Subject: Re: Forwarding from a FormAction with parameters... > > > hehe. > > what you need to do is add the "initial" value to the request object and > forward the control to a jsp, not a html page. There you can get the value > from the request scope and do your thing with it. > > Are you sure you want to forward and not redirect ? Your way of thinking is > not very clear and probably not such a good idea. > > ------------------------ > "Struts Users Mailing List" <[EMAIL PROTECTED]> > [EMAIL PROTECTED] wrote: > ------------------------ > > >I have an action, which upon success needs to forward to another page. > >Common enough, I made the following struts-config.xml entry: > > > > > > > > > >However, I need to pass parameters to the registerSuccess.html, so the > final > >URL should be: > > > >registerSuccess.html?type=initial > > > >Is there a way to do this and avoid having to hardcode the URL and > appending > >of the parameters in the Action? > > > >-AP_ > >www: http://www.alexparansky.com > > > >PS: I am sorry if this has been asked before, but I could not find where I > >can search the list for previously posted messages. > > > > > >-- > >To unsubscribe, e-mail: > >For additional commands, e-mail: > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>