This week's book giveaway is in the Android forum.
We're giving away four copies of Learning Java by Building Android Games and have Jean-Marcel Belmont on-line!
See this thread for details.
Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

isElIgnored doubt from HFSJ pgno.336  RSS feed

 
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
 
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
 
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
Boost this thread!