Another solution is what I did, was to specify a servlet as the value of the "input" attribute in struts-config.xml, and then in the servlet I have code which dynamically determines the correct URL for "input" and does a forward to that URL.
On Monday 17 February 2003 06:12 am, you wrote: > You will have to parameterize the action of your html:form then have > different actions in struts-config for each of those. A failing validation > will return to the appropriate input page. > > -----Original Message----- > From: Colin Hawkett [mailto:[EMAIL PROTECTED] > Sent: 17 February, 2003 16:09 > To: 'Struts Users Mailing List' ([EMAIL PROTECTED]) > Subject: Modifying action input at runtime > > > Hi all, > > I am looking to use an action to handle the submission of multiple > similar forms. Normally I would use separate actions, but in this case > the code is identical for the different forms. Everythign seesm to be > working fine except for the specification fo the input parameter on the > action. Depending on where the request cam eform, I want to have the > validate method return to different places. I thought the easiest way > to do this would be to use mapping.setInput() to specify at runtime > where I want it to return to, but when I try to do this I am getting > > Servlet Error: Configuration is frozen: java.lang.IllegalStateException: > Configuration is frozen > > You may be wondering how the same Form class could validate a bunch of > different html forms effectively. I actually have different Form > classes for each of the html forms, but in order to trick the > struts-config into allowing me to specify them all for the single > action, I specify a common Form base class in struts-config. Now I want > to dynamically set the input parameter in the validate() method of the > BaseForm subclass - but I can't see an obvious way to do it if the > configuration is frozen. Is there any way around this problem? > > Colin Hawkett > Technical Architect > > Morpheus - eBusiness Solutions > Morpheus Limited, Gibbs House, Kennel Ride, Ascot, Berkshire, SL5 7NT > Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > Tel: 01344 891621; Fax: 01344 891620 > Web: http://www.morpheus.co.uk <http://www.morpheus.co.uk/> > > *Winner of the IBM Solution Excellence Award for e-Commerce 2001* > *Solution Provider of the Month - Channel 2002 Magazine* *Investor in > People* > > > > > > *************************************************************************** >* > > This email and any files transmitted with it contain information that may > be confidential or privileged, and are intended solely for the use of the > individual or entity to whom they are addressed. If you are not the > intended recipient any disclosure, copying, distribution or use of the > information is prohibited. If you have received this email in error, please > notify me by return email immediately. Any opinions expressed are those of > the author, not of Morpheus Limited. > > > This message has been checked for all known viruses by UUNET delivered > through the MessageLabs Virus Control Centre. > > *************************************************************************** >* > > ______________________________________________ > > Disclaimer and confidentiality note > > > Everything in this e-mail and any attachments relating to the official > business of Standard Bank Group Limited is proprietary to the company. It > is confidential, legally privileged and protected by law. Standard Bank > does not own and endorse any other content. Views and opinions are those of > the sender unless clearly stated as being that of Standard Bank. > > The person addressed in the e-mail is the sole authorised recipient. Please > notify the sender immediately if it has unintentionally reached you and do > not read, disclose or use the content in any way. > > Standard Bank can not assure that the integrity of this communication has > been maintained nor that it is free of errors, virus, interception or > interference. > > ______________________________________________ > > --------------------------------------------------------------------- > 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]

