You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by AbelMacAdam <ab...@gmail.com> on 2007/12/20 10:11:09 UTC

ActionErrors.validate()

Hi all,

I just started reading a book about Struts, and are now learning about Error
Handling. To validate the input of the user in the forum, you need to write
your own implementation of org.apache.struts.action.ActionErrors. The class
ActionErrors has its own method validate. This method I can change to suite
my wishes. The only problem is, how is this method called. I can not find
any direct call of MyActionErrorsImplementation.validate(myMap, myRequest)
in my code. 

Am I correct in assuming validation is done automatically by the application
server? And if so, how? Or am I thinking in the wrong direction? If so, what
do I read?

TIA,
Abel
-- 
View this message in context: http://www.nabble.com/ActionErrors.validate%28%29-tp14432829p14432829.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: ActionErrors.validate()

Posted by David Smith <dn...@cornell.edu>.
Additionally when posting to the struts list, definitely mention what 
version you are working with.  A cursory look at the struts website 
shows version 1.3.x is significantly different from version 2.0.x.

I will say the class you are trying to extend should probably be 
ActionForm if using Struts 1.3.x instead of ActionErrors.  ActionErrors 
is really a collection of messages returned from the validate() method 
of an ActionForm instance.  If nothing else, the docs and articles 
available on the Struts website should help you out a lot.

--David

Pid wrote:

>AbelMacAdam wrote:
>  
>
>>Hi all,
>>
>>I just started reading a book about Struts, and are now learning about Error
>>Handling. To validate the input of the user in the forum, you need to write
>>your own implementation of org.apache.struts.action.ActionErrors. The class
>>ActionErrors has its own method validate. This method I can change to suite
>>my wishes. The only problem is, how is this method called. I can not find
>>any direct call of MyActionErrorsImplementation.validate(myMap, myRequest)
>>in my code. 
>>
>>Am I correct in assuming validation is done automatically by the application
>>server? And if so, how? Or am I thinking in the wrong direction? If so, what
>>do I read?
>>    
>>
>
>The Struts mailing list is probably a better place to start.
>
>p
>
>
>
>  
>
>>TIA,
>>Abel
>>    
>>
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: ActionErrors.validate()

Posted by Pid <p...@pidster.com>.
AbelMacAdam wrote:
> Hi all,
> 
> I just started reading a book about Struts, and are now learning about Error
> Handling. To validate the input of the user in the forum, you need to write
> your own implementation of org.apache.struts.action.ActionErrors. The class
> ActionErrors has its own method validate. This method I can change to suite
> my wishes. The only problem is, how is this method called. I can not find
> any direct call of MyActionErrorsImplementation.validate(myMap, myRequest)
> in my code. 
> 
> Am I correct in assuming validation is done automatically by the application
> server? And if so, how? Or am I thinking in the wrong direction? If so, what
> do I read?

The Struts mailing list is probably a better place to start.

p



> TIA,
> Abel


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org