--- Bill Siggelkow <[EMAIL PROTECTED]> wrote:

> If you are doing a wizard why are you forwarding to another Action 
> instead of to the "next" JSP?

actually this is a very good question.  i don't know why i am
forwarding to another action instead of the JSP.  :p

i will change my forward path value to JSP instead of to ".do" and see
if this helps, thanks!

woodchuck

> 
> Woodchuck wrote:
> 
> > --- Jim Barrows <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>
> >>>-----Original Message-----
> >>>From: Woodchuck [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, September 02, 2004 10:02 AM
> >>>To: struts
> >>>Subject: struts servlet chaining and immutable request?
> >>>
> >>>
> >>>hihi,
> >>>
> >>>in my Action object, i am doing servlet chaining by forwarding to
> >>>another ".do" instead of forwarding to a ".jsp".  so if i chain
> >>
> >>five
> >>
> >>>different Actions, they will execute like:  Action1 -> Action2 ->
> >>>Action3... Action5
> >>>
> >>>however, when doing this, the original request object is
> maintained
> >>>throughout the chaining such that Action5 doesn't know (or care)
> >>>whether the request was made directly or indirectly.
> >>>
> >>>my problem is that during the chaining, each Action looks at the
> >>
> >>same
> >>
> >>>parameter in it's execute method to decide to do something.  but
> >>>because the request is immutable the next Action sees the same
> >>>parameter value and does the same thing.
> >>>
> >>>how can i change the value of the request parameter after it's
> been
> >>>'used' by one Action, so the next Action sees an updated paramter
> >>>value?
> >>
> >>Ummmm.....  this sounds bizaare enough to make me question the
> >>engineering behind this.  Seems like it would be better to put the
> >>code your trying to execute into a business logic layer, or
> otherwise
> >>outside the action class to begin with.  However, I'll assume you
> >>have no choice...
> >>
> >>However, in answer to your qustion... have the action class check a
> >>session attribute first, then check the request parameter.
> > 
> > 
> > i'm implementing a "wizard".  it contains multiple different
> screens
> > (jsps), so i decided to make an abstract Action class to handle the
> > "Next", "Back" buttons on each jsp.
> > 
> > are there better strategies to handle "wizard" scenarios in struts?
> > 
> > so in my abstract Action class i'm looking at the button paramter,
> if
> > it's "Next" i will call an abstract Save method that the super
> class
> > implements.  then i will forward to the next Action screen (same
> > abstract class).. but the request parameter button still says
> "Next" so
> > it keeps going next forever... :/
> > 
> > 
> > 
> >>
> >>>(if you're wondering why my Actions are setup like this, it's
> >>
> >>because
> >>
> >>>they all extend the same abstract Action class that has logic to
> do
> >>>processing based on the request parameter... so what's really 
> >>>happening
> >>>is that each Action is executing the same thing but i'd like 
> >>>to be able
> >>>to have them do different things)
> >>>
> >>>any suggestions is much appreciated and thanks in advance,
> >>>
> >>>woodchuck
> >>>
> >>>
> >>>
> >>>           
> >>>_______________________________
> >>>Do you Yahoo!?
> >>>Express yourself with Y! Messenger! Free. Download now. 
> >>>http://messenger.yahoo.com
> >>>
> >>>
> >>
>
>>---------------------------------------------------------------------
> >>
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > 
> > 
> >             
> > _______________________________
> > Do you Yahoo!?
> > Win 1 of 4,000 free domain names from Yahoo! Enter now.
> > http://promotions.yahoo.com/goldrush
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



                
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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

Reply via email to