Good Afternoon Thai
Here is an example of building ActionErrors object inside execute() method
of your Action class
http://publib.boulder.ibm.com/infocenter/wsad512/index.jsp?topic=/com.ibm.etools.struts.doc/topics/rstrdoc009.html
NOTE: If a message is required, this saves the specified key(s) into the
request for use to be reported out by <struts:errors> tag.
HTH,
Martin-
----- Original Message -----
From: "Thai Dang Vu" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Thursday, July 07, 2005 3:45 PM
Subject: Which request is used in automatic Validation when therequirements
aren't met?
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)?
[EMAIL PROTECTED] 7/7/2005 3:01:34 PM >>>
If your input attribute identifies an Action instead of a JSP page,
you can do whatever you need to do within that Action.
On 7/7/05, Thai Dang Vu <[EMAIL PROTECTED]> wrote:
Hello everybody,
This is my action declaration in struts-config.xml
<action path="/add_provider"
type="AddProviderAction"
name="addProviderForm"
input="/WEB-INF/provider/addprovider.jsp"
validate="true"
scope="request">
</action>
In addprovider.jsp page, when I click 'Submit' and the requirements aren't
met, the request is forwarded to the input (which is
/WEB-INF/provider/addprovider.jsp). How and where can I get the request
before the input page appears (so that I can put something in the request
to make the input displays correctly)?
Thanks.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]