<netui:content> Tag
Displays text or the result of an expression.
<netui:content
[defaultValue="defaultValue"]
value="value" />
Displays text or the result of an expression.
Note that <netui:content> is similar to
<netui:span>
, except for the way
it processes HTML-sensitive text. The <netui:content> tag does not escape
HTML-sensitive characters, but the <netui:span> tag filters the input
string for characters that are senstive to
HTML interpreters and replaces these characters
with the corresponding entity strings. For example, if you pass the
string '&' to a <netui:span> tag, the string '&amp;' will be written to
the HTML source file, and the following will be displayed
in the browser: '&'.
The following table shows how the <netui:span> and <netui:content> tags treat HTML-sensitive characters.
tag |
generated HTML source |
displayed in browser |
<netui:content value="&"/> |
& |
& |
<netui:span value="&"/> |
&amp; |
& |
Attributes |
defaultValue |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The String literal or expression to be used as the default output. |
value |
Required: Yes | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The String literal or expression used to output the content. |
In this sample, the Content tag displays a Form Bean's lastName
property.
<netui:content value="${actionForm.lastName}"/>