Hello,
I build a custom Validator class for a DynaActionForm. The action tag looks like: <action path="/submitpay" type="SubmitPayFormAction" parameter="action" name="paymentForm" scope="request" input="/paymentForm.jsp"> When the validation fails the request will be directed to paymentForm.jsp.
I wonder if it's possible to direct the request to different pages in my custom validator class. This might be done by setting the input to an intermediate action or jsp, which is however not preferable in my case.
In a word, is there a way to tell struts not to use the path defined in "input" but another one in Validator class?
One thing you cannot do is change the value of "input" on an instance of ActionMapping which was created by Struts from a struts-config.xml -- those objects are shared and their configurations are frozen after initialization.
To do what you describe, you would have to make changes to the RequestProcessor class. This is certainly possible, but for your use case, you may just find it simpler to do the validation yourself in an action class. Just set "validate='false'" in your <action> element and then write your action class knowing that the validation needs to happen.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]