Struts 2 인증 설정

<!-- 
1.	      ,  :
1.1  XML    ,    : ActionName-validation.xml 
1.2      ActionSupport    :
1.1.1. setFieldError(Map<String,List<String>> msg)    
1.1.2. addFieldError("err2", "        ... ");

2.        : 
2.1 public void validate*(){…}
 -->
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE validators PUBLIC
  		"-//Apache Struts//XWork Validator 1.0.3//EN"
  		"http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd">
<validators>
	<field name="user.name">
		<field-validator type="requiredstring">
			<param name="trim">true</param>
			<message>       ...</message>
		</field-validator>
	</field>
	<field name="user.password">
		<field-validator type="requiredstring">
			<param name="trim">true</param>
			<message>      ...</message>
		</field-validator>
	</field>
</validators>

좋은 웹페이지 즐겨찾기