• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 Validation Annotation issue..

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
reply
    Bookmark Topic Watch Topic
  • New Topic