简体   繁体   English

在Struts 1.2框架中的DispatchAction中进行验证

[英]Validation in DispatchAction in struts 1.2 framework

我如何在不同的DispattionAction Struts 1.2框架2方法中实现验证

Specify two different action mappings for this particular dispatch action class. 为此特定的调度动作类指定两个不同的动作映射。 For each mapping you may specify a different validation setting. 对于每个映射,您可以指定一个不同的验证设置。

<action path="/someAction" name="somForm" type="com.examples.SomeDispatchAction />
<action path="/anotherAction" name="anotherForm" type="com.examples.SomeDispatchAction />

Note that the same class declares two different action forms named "someForm" and "anotherForm". 请注意,同一类声明了两个不同的动作形式,分别为“ someForm”和“ anotherForm”。 This way you can specify two different validations set. 这样,您可以指定两个不同的验证集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM