You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thai Dang Vu <TV...@dhmh.state.md.us> on 2005/07/08 14:56:22 UTC

Re: Which request is used in automatic Validation when the requirements aren't met?

Thanks Jeff and Laurie and excuse me for my slow understanding :) I understand what you said now :)

>>> laurie@holoweb.net 7/7/2005 11:13:46 PM >>>
Thai Dang Vu wrote:
> Perhaps I stated it unclearly.
> 
> I am using automatic validation, not manual validation (which uses validate method of the form bean). If the requirements aren't met, Struts will lead us to the input page (in my case the /WEB-INF/provider/addprovider.jsp) without going to the execute method of the AddProviderAction class.
> 
> So my question is: is there any place I can interrupt the request before the addprovider.jsp appears and displays the errors (I use <html:errors/> in that page)?

You weren't unclear, but Jeff's response was correct. He pointed out that 
your input can be an action, which can then do whatever you need, instead 
of a JSP. You just need to change your action mapping so the 'input' 
attribute names the mapping for your AddProviderAction rather than pointing 
at a JSP directly.

L.
-- 
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org