• Post Reply Bookmark Topic Watch Topic
  • New Topic

use of el-ignored in the page directive  RSS feed

 
Ravindranath Chowdary
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
In the Servlets and JSP by Kathy Sierra i read this question. For this it is given as C is the correct option
<%@ page isELIgnored="true" %>
what is the effect?

A. Nothing this page directive is not defined.
B. The JSP containing this directive should not have any expression language code evaluated by the JSP container.
C. the page directive will only turn off EL evaluation if the DD declares a <el-ignored>true</el-ignored> with a url pattern that includes this jsp.

C is given as correct?
 
Stefan Evans
Bartender
Posts: 1836
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are talking Servlet2.3/JSP1.2, then I would choose A

If you are talking Servlet2.4/JSP2.0, then I would choose B

Reference the JSP2.0 spec (section 3.3.2)


Option C to me is obviously wrong.
The entry in web.xml is an alternative way of enabling/disabling EL evaluation in pages. However the page directive tag tags precedence over it. If that tag is present, whatever is defined in the DD is irrelevant.

Go and check this page to see if the error is listed:
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed
[ November 26, 2006: Message edited by: Stefan Evans ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This one comes often at the SCWCD forum. It's definitly not answer C, but B.
 
Soniya Ahuja
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, the answer has been corrected in second edition of Head First. Option B is the correct option.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!