Writes the bean contents. Supports data types beyond <c:out> and <bean:write>, such as XML nodes for HTML snippets.
If the bean is null
then nothing is displayed.
This is generally for compatibility with Struts 1.X and predates
JSTL
and Expression Language.
JSTL,
Expression Language,
and other tags should generally be preferred.
The method attribute provides the name of the method that will be used to get the display value.
If not provided, it will default to toString
.
This method searches for the method of the given name with no parameters. It is an error if the method is
not found.
The content type depends on the value provided to the type attribute, and defaults to text/plain
.
The content is checked for well-formedness based on its type:
css
ortext/css
- must be well-formed CSS content. (Note: Currently only checks character values.)javascript
,application/javascript
, ortext/javascript
- no validationjson
orapplication/json
- no validationld_json
orapplication/ld+json
- no validationtext
ortext/plain
- no validationurl
ortext/url
- must be a valid URLxhtml
orapplication/xhtml+xml
- must be well-formed XHTML content. (Note: Currently only checks character values.)xhtml_attribute
orapplication/xhtml+xml+attribute
- must be a valid XHTML attribute.mysql
ortext/x+mysql
- must be valid MySQL command "mysql" inputpsql
ortext/x+psql
- must be valid PostgreSQL command "psql" inputsh
ortext/x+sh
- must be valid shell script
Tag Information
Tag Class: | com.aoapps.taglib.WriteTag |
---|---|
TagExtraInfo Class: | com.aoapps.taglib.WriteTagTEI |
Body Content: | scriptless |
Display Name: | None |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
scope | No | Runtime | String |
Specifies the variable scope searched to retrieve the bean specified by name. If not specified, the default rules applied by JspContext.findAttribute() are applied. |
name | No | Runtime | Object |
Specifies the attribute name of the bean whose property is accessed to retrieve the value specified by property (if specified). If property is not specified, the value of this bean itself will be used. A nested <ao:name> tag will override this value. |
property | No | Runtime | String |
Specifies the name of the property to be accessed on the bean specified by name. This value may be a simple, indexed, or nested property reference expression. If not specified, the bean identified by name will itself be used. |
method | No | Runtime | String |
Specifies the method that will be used to convert the object to a
String.
This defaults to
|
type | No | Runtime | Object |
Specifies the type of content contained in the bean.
Defaults to |