RE: Accessing Validation Errors in an Action

2006-04-28 Thread Chaudhary, Harsh
Try this:

In your Action class, use this method call: 
getErrors(javax.servlet.http.HttpServletRequest request)

The javadoc for this method is at:
http://struts.apache.org/struts-doc-1.2.7/api/org/apache/struts/action/A
ction.html

Harsh.

-Original Message-
From: Lixin Chu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 7:10 PM
To: Struts Users Mailing List
Subject: Re: Accessing Validation Errors in an Action


if the validation is done at the server side (in your actionform), then
you
can easily get the errors.

On 4/28/06, Asad Habib [EMAIL PROTECTED] wrote:

 How do I access errors that the Validator places in the ActionErrors
 object instance within a Struts action? I need to do this in my action
 code so I can throw the appropriate kind of exception. Thanks.

 - Asad

 -
 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]



Accessing Validation Errors in an Action

2006-04-27 Thread Asad Habib
How do I access errors that the Validator places in the ActionErrors 
object instance within a Struts action? I need to do this in my action 
code so I can throw the appropriate kind of exception. Thanks.


- Asad

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing Validation Errors in an Action

2006-04-27 Thread Lixin Chu
if the validation is done at the server side (in your actionform), then you
can easily get the errors.

On 4/28/06, Asad Habib [EMAIL PROTECTED] wrote:

 How do I access errors that the Validator places in the ActionErrors
 object instance within a Struts action? I need to do this in my action
 code so I can throw the appropriate kind of exception. Thanks.

 - Asad

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Accessing Validation Errors in an Action

2006-04-27 Thread Rick Reumann

Asad Habib wrote:
How do I access errors that the Validator places in the ActionErrors 
object instance within a Struts action? I need to do this in my action 
code so I can throw the appropriate kind of exception. Thanks.


I show this very thing at the end of this article:

http://www.learntechnology.net/validate-manually.do

--
Rick


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing Validation Errors in an Action

2006-04-27 Thread Asad Habib
Hello Rick. Great! Thank you for the URL. This site has a wealth of 
information on it!


- Asad


On Thu, 27 Apr 2006, Rick Reumann wrote:


Asad Habib wrote:
How do I access errors that the Validator places in the ActionErrors object 
instance within a Struts action? I need to do this in my action code so I 
can throw the appropriate kind of exception. Thanks.


I show this very thing at the end of this article:

http://www.learntechnology.net/validate-manually.do

--
Rick


-
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]