> -----Original Message----- > From: Sebastian Ho [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 19, 2004 2:20 AM > To: Struts Users Mailing List > Subject: different inputs in struts-config > > > 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.
It does... and you tell it which jsp it comes from in the input param. > > 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. You might want to look at the page number settings in validation, if you're doing a multi-page wizard type form fill-in. > > 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>? Well, the on in input is the correct one. > > Thanks > > Sebastian Ho > > > --------------------------------------------------------------------- > 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]