Attribute "short-circuit" must be declared for element type "validator".

使用struts2验证是报错:
引用
Attribute "short-circuit" must be declared for element type "validator".


解决办法:
将<actionClass>-<actionAlias>-validation.xml的头:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC 
          "-//OpenSymphony Group//XWork Validator 1.0//EN" 
          "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd" >

改为:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC 
          "-//OpenSymphony Group//XWork Validator 1.0.2//EN" 
          "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd" >

http://hi.baidu.com/kris_wuj/blog/item/4f91645028b70459574e004c.html

你可能感兴趣的:(html,xml,Blog)