• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

isElIgnored doubt from HFSJ pgno.336

 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ page isElIgnored="true" %>
What is the effect?
a> Nothing. tis page directive is not defined.>>incorrect
b> The jsp containg this directive shoulf not have any experession language code evaluated by the JSP container..>>incorrect
c> This page directive will only turnOff EL. evaluation if the DD declares a <el-ignored>true</el-ignored> element with url pattern that include in this Jsp..>>correct

In above i dont understand why answer b is not corect and also why answer c is correct because as given in HFSJ page number 320 page directive always wins...that means whether in DD <el-ignored> tag is declared true or false BUT if you declare false in directive The EL will be evaluated...Please Correct me if i'm wrong.

So my one more query regarding this is "if i declare <%@ page isElIgnored="true" %> then there is also need to configure that perticular jsp in DD..

Thanks,
Brijesh
 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brijesh,
If <%@ page isElIgnored="true" %> in a particular page but in DD if <el-ignored>true</el-ignored> is not given then the EL will not be evaluated only in that particular page. But in rest of the application they will be evaluated. So in order to stop evaluating EL in the application you have to give <el-ignored>true</el-ignored> in DD. So in Chp 7 Qn 6 , E is the correct option
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Brijesh,

The correct answer is option B in your list of answers (and in Head First Servlets & Jsp pg 336 it's answer D)

I found also Bryan Basham's (the author) answer

...and in the JavaServer Pages Specification Version 2.0 pg 1-49 it says:
isELIgnored
Defines whether EL expressions are ignored or evaluated for
this page and translation unit. If true, EL expressions (of the
form ${...}) are ignored by the container. If false, EL
expressions (of the form ${...}) are evaluated when they
appear in template text or action attributes. The
corresponding JSP configuration element is el-ignored (see
Section JSP.3.3.2). The default value varies depending on the
web.xml version - see Section JSP.2.2.4, ´┐ŻDeactivating EL
Evaluation´┐Ż.

Kind regards,

Gian
[ January 07, 2008: Message edited by: Gian Franco ]
 
Brijesh shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks i got it.
[ January 08, 2008: Message edited by: Brijesh shah ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic