10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

■ Configure the page with the page directive.<br />

To escape the #{ or ${ characters in the page, you use the \ character as follows:<br />

some text \#{ some more\${ text<br />

<br />

Another way to deactivate EL evaluation is by using a JSP property group to either allow the #{<br />

characters as a String literal using the deferred-syntax-allowed-as-literal subelement, or<br />

to treat all expressions as literals using the el-ignored subelement:<br />

<br />

<br />

true<br />

<br />

<br />

or<br />

<br />

true<br />

<br />

Finally, you can configure the page with the page directive to either accept the #{ characters as<br />

String literals with the deferredSyntaxAllowedAsLiteral attribute, or to ignore all EL<br />

expressions using the isELIgnored attribute:<br />

<br />

or<br />

<br />

Unified Expression Language<br />

<strong>The</strong> valid values of these attributes are true and false.IfisELIgnored is true, EL expressions<br />

are ignored when they appear in static text or tag attributes. If it is false, EL expressions are<br />

evaluated by the container only if the attribute has rtexprvalue set to true or the expression is<br />

a deferred expression.<br />

<strong>The</strong> default value of isELIgnored varies depending on the version of the web application<br />

deployment descriptor. <strong>The</strong> default mode for JSP pages delivered with a Servlet 2.4 descriptor is<br />

to evaluate EL expressions; this automatically provides the default that most applications want.<br />

<strong>The</strong> default mode for JSP pages delivered using a descriptor from Servlet 2.3 or before is to<br />

ignore EL expressions; this provides backward compatibility.<br />

Chapter 5 • <strong>Java</strong>Server PagesTechnology 157

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!