File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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..
 
Similar Threads
Struts 2 InterceptorStack Issues
Replacing an Interceptor in the Default Stack
Struts 2 file upload tag type allowed error
Overriding default interceptor stack
NullPointerException @ validation interceptor