Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

HF Incorrect Mock Answer

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was considering sending this gotcha to wickedlysmart.com, but since so many people on these boards are using the HF book to study for the 1.4 test I decided put it here.

The question is on page 336, question 6: What's the effect of <%@ page isELIgnored="true" %>

The answer in the book is: "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."

That contradicts what the JSP 2.0 spec says in section 3.3.2. There it says explicitly that once the isELIgnored page directive shows up on the JSP, the container shouldn't even care what's in the DD. The page directive wins.

I don't know if this one's already been caught. I'm posting it here because I haven't seen anyone else post on this question. (Oh, OK -- and because I'm a know-it-all.)

Another odd wrinkle about EL and its interaction with the DD that the book isn't precise about is how and why EL is turned on by default. In the spec, it says that EL is turned on by default only if the web.xml uses version 2.4 or greater. Otherwise EL is ignored.

BTW, I'm loving the book. Great work, guys.

Roger Turnau
SCJP 1.4
SCWCP 1.4 (Preparing)
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roger you are right.

Check this thread as well
https://coderanch.com/t/168153/java-Web-Component-SCWCD/certification/HF-Chaper-JSP
 
reply
    Bookmark Topic Watch Topic
  • New Topic