wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ Mock Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ Mock Exam" Watch "HFSJ Mock Exam" New topic
Author

HFSJ Mock Exam

Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
Given:
1. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/
jstl/core" %>
2. <%@ taglib prefix="tables" uri="http://www.javaranch.
com/tables" %>
3. <%@ taglib prefix="jsp" tagdir="/WEB-INF/tags" %>
4. <%@ taglib uri="UtilityFunctions" prefix="util" %>
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.

Correct answer: C. I think option C is wrong and right answer should be option D. Help me to find the correct answer.

Srividhya
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I agree that it cannot be C. D looks like the only answer.


[My Blog]
All roads lead to JavaRanch
Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
Thanks christophe. These questions are from HFSJ mock exam 2nd edition. Is there any errata for this edition.

And I have a doubt in a topic not related to this post. Can a request dispatcher be used to forward a request to a file in another web application. I am taking my exam tomorrow so in a hurry. Sorry.

Srividhya
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Errata
Paul Brabban
Ranch Hand

Joined: Jan 13, 2008
Posts: 44
Hi Srividhya

From Javadocs for ServletRequest interface:

The pathname specified may be relative, although it cannot extend outside the current servlet context. If the path begins with a "/" it is interpreted as relative to the current context root. This method returns null if the servlet container cannot return a RequestDispatcher.

So no, request dispatcher can only dispatch relative to the context root.

Good luck in your exam!

Paul


"The important thing is not to stop questioning."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ Mock Exam