$B@hF|$O$"$j$,$H$&$4$6$$$^$7$?!#EDCf$G$9!#(B<br><br>$B2<5-$N%3!<%I$N$h$&$K(BAction$B%a%=%C%IFb$GJL$N(BAction$B%a%=%C%I$r8F$S=P$9$H!"(B<br>edit$B%a%=%C%I$N(BValidation$B$K2C$($F!"(Btop$B%a%=%C%I8F$S=P$7;~$K$bF1$8(BValidation<br>$B$,8F$S=P$5$l$F$7$^$$$^$9!#(B<br>(top$B%a%=%C%I$G$O(BValidation$B$N@_Dj$O$5$l$F$$$^$;$s!K(B<br>token$B$r;H$C$F$$$k>l9g$KLdBj$,$*$-$F!"(B<br>2$BEY(Bvalidation$B$,<B9T$5$l$F$7$^$&$?$a$K(Btoken$B%(%i!<$K$J$C$F$7$^$$$^$9!#(B<br>
<br>$B6&DL$N%Z!<%8$KHt$P$7$?$$>l9g$J$I!"(BAction$B%a%=%C%IFb$GJL$N(BAction$B%a%=%C%I$r(B<br>$B8F$S=P$;$k$HJXMx$@$H;W$&$N$G!"8!F$$h$m$7$/$*4j$$$7$^$9!#(B<br><br>public ValidationRules validation = new DefaultValidationRules("hoge.") {<br> @Override<br> public void initialize() {<br>
add("comment", new RequiredValidator() , new MaxLengthValidator(1024));<br> add("cubby.token", new TokenValidator());<br> }<br>};<br><br><br>@Path("edit")<br>@Validation(rules = "validation", errorPage = "form.jsp")<br>
public ActionResult edit() {<br> // $B=hM}>JN,(B<br> return top();<br>}<br><br><br>@Path("/")<br>public ActionResult top() {<br> // $B=hM}>JN,(B<br> return new Forward("index.jsp");<br>}<br><br><br>--<br>Hirokazu Tanaka<br>