Try using the attribute/formAttribute in the action
mapping. I think it should work.



--- Sebastian Ho <[EMAIL PROTECTED]> wrote:

> Thanks Susan.
> 
> Refer to my comments below
> 
> Sebastian Ho
> 
> 
> On Thu, 2004-08-19 at 21:23, Susan Bradeen wrote:
> > Sebastian Ho <[EMAIL PROTECTED]> wrote
> on 08/19/2004 05:19:35 
> > AM:
> > 
> > > hi
> > > 
> > > I used the same actionform for a few JSP pages,
> which I guess is good
> > > practice. The problem occurs when I add in
> validation in my ActionForm. 
> > > 
> > > Because in the struts-config, only one <input>
> is specified for every
> > > Action. Therefore, whenever validation fails and
> struts display the
> > > error messages, struts prints it in the JSP
> given in <input>.
> > > 
> > > Ideally, struts should forward and prints out
> the error messages in the
> > > JSP that calls the ActionForm.
> > > 
> > > I tried adding in multiple action mapping in my
> struts-config with
> > > identical settings except <input>, which I hope
> struts will be smart
> > > enough to decide which mapping to use.
> Unfortuntely, it doesn't.
> > >
> > 
> > Yes, you can reuse your actionform for multiple
> action mappings, but are 
> > your action mappings really identical except for
> the input? If I 
> > understand what you are trying to do, it sounds
> like you should have:
> > 
> > Action1 specifies ActionForm1 and input JSP1 and
> forwards to JSP1.
> > JSP1 probably then submits to Action2.
> > Action2 specifies ActionForm1 and input JSP2 and
> forwards to JSP2.
> > JSP2 probably then submits to Action3.
> > Action3 specifies ActionForm1 and input JSP3 and
> forwards to JSP3.
> > 
> 
> All of them ues the same action Action because I am
> using
> LookupDispatchAction.
> 
> So the struts-config ideally should be (which
> doesn't work) :
> Action1 specifies ActionFrom1 and input JSP1.
> Action1 specifies ActionForm1 and input JSP2.
> Action1 specifies ActionForm1 and input JSP3.
> 
> How do I achieve this effect?
> 
> > Is that about right? In this case, Validator
> should work fine.
> > 
> > Hth,
> > Susan Bradeen
> >  
> > > I have read online that this strategy is quite
> popular. Therefore I am
> > > sure there is a solution to this problem.
> > > 
> > > How do I forward the ActionError to the correct
> JSP instead of the one
> > > in <input>?
> > > 
> > > Thanks
> > > 
> > > Sebastian Ho
> > > 
> > > 
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> >
>
_____________________________________________________________________________
> > > Scanned for SoftLanding Systems, Inc. by IBM
> Email Security 
> > > Management Services powered by MessageLabs. 
> > > 
> >
>
_____________________________________________________________________________
> > 
> > 
> >
>
_____________________________________________________________________________
> > Scanned for SoftLanding Systems, Inc. by IBM Email
> Security Management Services powered by MessageLabs.
> 
> >
>
_____________________________________________________________________________
> > 
> >
>
---------------------------------------------------------------------
> > 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]

Reply via email to