This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Struts 2 Validation Annotation issue.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Validation Annotation issue.." Watch "Struts 2 Validation Annotation issue.." New topic
Author

Struts 2 Validation Annotation issue..

Santhosh Kg
Greenhorn

Joined: Aug 17, 2009
Posts: 8
Hi,

I am new to struts 2 and is having problem with validation annotation.
The scenario is,i have 2 methods in my action class and i wanted to have validation for only one method.
I use @Validations for the method i need validation and @SkipValidation for the other method.

My interceptor-stack is like the below,

<interceptor-stack name="myStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="breadCrumbs"/>
<interceptor-ref name="validation">
<param name="validateAnnotatedMethodOnly">true</param>
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
</interceptor-stack>

The problem is,if i use @SkipValidation,there will not be any validation at all(for both the methods) and if i remove @SkipValidation,
there is validation for both the methods.. :-(

Can anybody help please..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 Validation Annotation issue..