• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about EL

 
avseq anthoy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ page 336 Question6
It says:
<%@page isElIgnored="true"%>

Option D
The JSP containing this directive should not have any Expresion Language code evaluated by the JSP container.

Why this option is wrong?
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Avseq,

yes you are right one could think about it this way, but when you review page 320 in HFSJ, one can find that the only intention of



is to switch off EL-looking things or better to let the Container ignore reading EL-looking thinks in a JSP file.

So Answer D does not hold. On the other hand the correct Answer E says:


This page directive will only turn off EL evaluation if the DD declares a <el-ignored>true</el-ignored> element with a URL pattern that includes this JSP.


Honestly , to my opinion this answer also does not hold because it has nothing to do with the question except the fact that it wants to switch off EL through a DD . Answer E let someone think that the page directive and the DD are related to each other which is not in sync with the explanation on HFSJ p. 320 where it says:


If you want EL-looking things in your JSP to be ignored, you have to say so explicitly, either through a page directive or a DD element.




Regards,
Darya
[ September 04, 2005: Message edited by: Darya Akbari ]
 
avseq anthoy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your detail reply.I understand.
 
narendra darlanka
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the answer to the question 6 in page 336 is 'D' and not 'E' ,please check the HFSJ errata.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Narendra,

you are right. And I thought I went through the errata list and corrected all erratas. Seems that I forgot that one .

Answer D is definitely much nicer than Answer E and is in sync with p. 320:


... if you happened to have template text (plain old HTML or text) in your JSP that included something that looked like EL (${something}) ...


Sorry for any confusion and thanks Narendra.

Regards,
Darya
[ September 05, 2005: Message edited by: Darya Akbari ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic