Cubby tags
Tag token
2重サブミット防止用の input タグ(type="hidden")を出力します。
Example:
(JSP) <t:form value="${action}"> <t:token / > <t:/form> (実行結果) <form> <input type="hidden" name="cubby.token" value="ランダムな文字列..."> </form> (アクション) public class TokenAction extends Action { ... public ValidationRules validation = new DefaultValidationRules() { @Override public void initialize() { add("cubby.token", new TokenValidator()); } }; ... @Form @Validation(errorPage="token.jsp", rules = "validation") public ActionResult message() { return new Forward("result.jsp"); } }
Tag Information |
Tag Class | org.seasar.cubby.tags.TokenTag |
TagExtraInfo Class | None |
Body Content | scriptless |
Display Name | None |
Attributes |
Name | Required | Request-time | Type | Description |
name | false | true | java.lang.String | value 属性として出力する値を取得するフォームオブジェクトのプロパティ名を指定します。 この属性の値は name 属性としてそのまま出力されます。 name 属性が省略された場合の初期値は「cubby.token」です。 |
Variables |
No Variables Defined. |
Output Generated by
Tag Library Documentation Generator.
Java, JSP, and JavaServer Pages are trademarks or
registered trademarks of Sun Microsystems, Inc. in the US and other
countries. Copyright 2002-4 Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054, U.S.A.
All Rights Reserved.