Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding EL ignored.

 
Purna Chandra Rao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If the El-ignored is specified in the Deployment Descriptor and the isELIgnored is specified using the page directve in the jsp page, the one in the page always takes the priority.
What if it is not specified in the DD and is specified in the JSP page using the page directive.

Thanks and Regards,
Purna Chandra Rao
SCJP 1.4 - 100%
 
Tha�s Manfrim Firmino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's only specified on DD, it considers the DD.
If it's only specified on the jsp, it considers the JSP.
If it's specified on both it considers the JSP, because its more specific.
If it's not specified anywhere, it considers the default, which means that EL can be used.
 
Purna Chandra Rao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thais,
Even i thought that way.But,i have posted this question with reference to the question in HFSJ in page no 336.The question goes like this

Given
<%@page isELIgnored="true" %>
What is the effect ( Choose all that apply)

A) Nothing, this page directive is not defined
B) The directive turns off the evaluation of Expression language code by the JSP container in all of the web applications JSP's.
C)The JSP containing this directive should be treated by the JSP container as the well formed XML file.
d)The JSP containing this directive should not have any expression language code evaluated by the container.
e)The page directive will only turn off EL evaluation if the DD declares a <el-ignored> true </el-ignored> element in the URL pattern that includes this JSP.

I thought the answer is d but the answer given there is e.Is the answer given in the book incorrect?

Thanks and Regards,
Purna Chandra Rao
SCJP 1.4 - 100%
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have hfsj but i think d should be a correct option.
 
Swati Udas
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey you are right. Even I have marked this question to be posted on javaranch. As per my understanding the answer should be d).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic