JSTL-XML <x:set>タグ
XPath式の結果がブール値の場合、 <x:set> タグはjava.lang.Booleanオブジェクトを設定します。文字列の場合、java.lang.String;数値の場合、java.lang.Number。
属性
Attribute | Description | Required | Default |
---|---|---|---|
var | A variable that is set to the value of the XPath expression | Yes | Body |
select | The XPath expression to be evaluated | No | None |
scope | Scope of the variable specified in the var attribute | No | Page |
例
次の例は、 <x:set> タグの使用方法を示します-
上記のJSPにアクセスすると、次の結果が表示されます-