12.5 The isELIgnored Attribute

The isELIgnored attribute controls whether the JSP 2.0 Expression Language (EL) is ignored ( true ) or evaluated normally ( false ). This attribute is new in JSP 2.0; it is illegal to use it in a server that supports only JSP 1.2 or earlier. The default value of the attribute depends on the version of web.xml you use for your Web application. If your web.xml specifies servlets 2.3 (corresponding to JSP 1.2) or earlier, the default is true (but it is still legal to change the defaultyou are permitted to use this attribute in a JSP-2.0-compliant server regardless of the web.xml version). If your web.xml specifies servlets 2.4 (corresponding to JSP 2.0) or later, the default is false . Use of this attribute takes one of the following two forms.

 <%@ page isELIgnored="false" %> <%@ page isELIgnored="true" %> 

JSP 2.0 introduced a concise expression language for accessing request parameters, cookies, HTTP headers, bean properties and Collection elements from within a JSP page. For details, see Chapter 16 (Simplifying Access to Java Code: The JSP 2.0 Expression Language). Expressions in the JSP EL take the form ${ expression } . Normally, these expressions are convenient . However, what would happen if you had a JSP 1.2 page that, just by happenstance, contained a string of the form ${...} ? In JSP 2.0, this could cause problems. Using isELIgnored="true" prevents these problems.

Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net