• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Question of Chapter 7 of HFSJ

 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the Mock Question of Chapter 7 of HFSJ

Given
<%@ page isELIgnored="true"%>
What is the effect?

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 application's JSPs.

C.The JSP containing this directive should be treated by the JSP container as a well-formed XML file.

D.The JSP containing this directive should NOT have any Expression Language code evaluated by the JSP container.

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

My opinion Answer is D

But Explanation of book says Answer is E

Experts views???
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Please refer this thread.

Thanks
 
Matthew Vanbiervliet
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gaurav,

I agree with you, I'd also choose the D answer.
I had a look in the errata of the book, and very strange, there is a note about this question, and it confirms the E answer :


{336} Question #6;
The answer should be E, not D


HFSJ Errata

I'm not sure to understand everything. Why doing an errata if there was no error ? Or is there an error in the errata

Anyway, there is an interesting table in the JSP 2.0 specification (pg I-88, table JSP.3-1) , where they explain the combinations of settings in the DD/page directive. It seems to confirm answer D.

But again, there is something not very clear there : they are using "unspecified" and "don't care" to describe the setting in the DD. I guess "unspecified" and "don't care" have a rather close signification, so assuming this, nothing set in the DD and isELIgnored="true" in the page makes EL expressions being ignored, which comes down to answer D.

Can anyone confirm this ?
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narendra I already gone thru that thread but it does not come up with any conclusion, Matthew , yes even I tried this, like without specifying <el-ignored> in DD and on JSP page <%@page isELIgnored="true"%> and as well as <%@page isELIgnored="false"%> , and after that I only posted in forum, So I am still with option D.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic