Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ Mock Exam Question

 
Anand Labhishetty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying out the Q:63 from Mock exam.

I am typing in part of the question that i have doubt -
--------------------------------------------
<jsp:setProperty name="x" property="a" value="something"/>
<c ut value="hello"/>
--------------------------------------------
The Explanation says that we won't get any error if we use the jsp standard action. But can we use the <jsp:setProperty> without <jsp:useBean> or anything that introduces the variable "x" ?
I am getting error when i tried to execute the single line of code in a JSP. Can you please explain?

Also, the <c ut> is not generating any error nor even any output.
The explanation says that it should generate a error.But I am not getting any. What does the spec say about it?

I am using Tomcat 5.0.28.

Cheers
Anand
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can guarantee that you are getting output. View the page source from your browser.
 
Anand Labhishetty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marc,

When i see the view source i can see <c ut value="hello"/>
i.e., the code i have typed in.
The explanation in the book says that if we use the tag without declaring the prefix, it should generate a error. Is that correct?

Also, could you please explain the issue i have posted for <jsp:setProperty> ? As mentioned, I am getting an error if i include only <jsp:setProperty> tag in the JSP but the book says that it should be ok.

Cheers
Anand
 
cheenu Dev
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are two posts regarding this topic.
refer here
and here

better search before you post.
 
Anand Labhishetty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the providing the links cheenu.

I looked for the errata of HFSJ on the net and didn't find what I was looking for, So i thought i would post it(as i was in a bit of hurry).

Keeping that aside, I have finished my exam today with 92%.

Would like to Thank all you guys for providing all the required info.

Cheers
Anand.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anand Labhishetty:
Keeping that aside, I have finished my exam today with 92%.


Huzzah!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic