validate by manual programming <br>1: validate every action method <br> (1):extend actionsupport and rewrite the validate method <br> (2):<result name="input"/> <br> (3):<s:filederror /> <br>2: validate specific action method <br> (1):add validatexxx method to validate xxx method <br> (2):<result name="input"/> <br> (3):<s:filederror /> <br>validate by xml configuration <br>1: validate every action method <br> (1):add actionclassname-validation.xml <br> (2):<result name="input"/> <br> (3):<s:filederror /> <br>2: validate specific action method <br> (1):add actionclassname-actionname-validation.xml <br> (2):<result name="input"/> <br> (3):<s:filederror /> <br>validation.xml searching order: <br>1:single action <br> owner:actionclassname-validation.xml <br> owner:actionclassname-actionname-validation.xml <br>2:have parent <br> parent:actionclassname-validation.xml <br> parent:actionclassname-actionname-validation.xml <br> owner:actionclassname-validation.xml <br> owner:actionclassname-actionname-validation.xml
struts method validate的使用
最新推荐文章于 2024-08-18 21:36:31 发布