%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
Bean tag examples
Bean tag examples
<bean:write>
1. Display bean properties
Boolean: |
|
Double: |
|
Float: |
|
Integer: |
|
Long integer: |
|
Short integer: |
|
String: |
|
Date: |
|
2. Formatting output
Formatted number (using format): |
|
Formatted number (using formatKey): |
|
Formatted date (using format): |
|
Formatted date (using formatKey): |
|
3. Display values from collections, arrays and nested beans
List entry: |
|
Array entry: |
|
Nested property: |
|
4. Filtering HTML tags in output
Filtered text: |
|
Unfiltered text: |
|
<bean:define>
<bean:header>
<%-- Not working in webappcabaret
<bean:include>
--%>
<bean:message>
<bean:parameters>
Parameter 1: |
|
Parameter 2: |
|
Parameter 3: |
|
<bean:size>
<bean:cookie>
Display the properties of our current session ID cookie (if there is one):
Property Name | Value |
comment |
|
domain |
|
maxAge |
|
<%-- Fails on Tomcat 3.3.1a
name |
|
--%>
path |
|
secure |
|
value |
|
version |
|
Display the properties of an undefined cookie that was given the default value UNKNOWN_VALUE:
Property Name | Value |
comment |
|
domain |
|
maxAge |
|
<%-- Fails on Tomcat 3.3.1a
name |
|
--%>
path |
|
secure |
|
value |
|
version |
|