It's not a secret anymore!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question 49 of HFSJ Final mocktest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question 49 of HFSJ Final mocktest" Watch "Question 49 of HFSJ Final mocktest" New topic

Question 49 of HFSJ Final mocktest

geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208

What about the above taglib directives would cause the JSP to not function?
A. Line 4 is wrong because the prefix attribute must come before the
uri attribute.
B. Line 3 is wrong because there is no uri attribute.
C. Line 4 is wrong because the uri value must begin with http://
D. Line 3 is wrong because the prefix jsp is reserved for standard actions.

The given answer is C. But its not necessary that uri must begin with http:// ?
According to me the answer is d since jsp is the reserved word.
Please clear my doubt.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

I also think it's D. The URI used to identify a tag library is not required to begin with http://

[My Blog]
All roads lead to JavaRanch
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi Geeta. I tested this in tomcat5.5.9 . Here uri value no need to begin with http:// . I think option C is wrong. Option D is correct.
Victor Bucutea
Ranch Hand

Joined: Nov 24, 2008
Posts: 43
Hi ,

You're right, that is a mistake - i believe - in the book . It even explains that it is not necesarry to use http:// in a URI.
I agree. Here's the link:
subject: Question 49 of HFSJ Final mocktest
Similar Threads
Question 49
HFSJ Edition 2 Final mock exam QNo:49
HFSJ Mock Exam
Question regarding answers in HFSJ 2nd ed mock exam
Final Mock Test Question 49,69, Head First and Servlets