开发者

How to exclude action methods frm validation in struts2

How to exclude action methods from validation in struts2 ... for example i wann do validation for one action login with two fileds and other action method in same act开发者_如何学编程ion class say test methode with filed message..... how can i do it?? using one xml file?


You have to add the following to your xml config file in order to change your validation interceptor.

<interceptor-ref name="validation">
      <param name="excludeMethods">input,back,cancel,browse,YOUR_METHOD_NAME</param>
</interceptor-ref>

Alternatively you can annotate the method with

@org.apache.struts2.interceptor.validation.SkipValidation
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜