File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Final Mock Test  Question 49,69, Head First and Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Final Mock Test  Question 49,69, Head First and Servlets" Watch "Final Mock Test  Question 49,69, Head First and Servlets" New topic
Author

Final Mock Test Question 49,69, Head First and Servlets

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Final Mock Test Question 49,69, Head First and Servlets

q-49



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 is C
I think the correct answer is D



jsp is reserved .It can't be used
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
q-69

Your web application has a valid dd with a single <security-constraint> tag.
Within this tag exists:
- a single http method that declares GET
All of the resources in your application exist within directory1 and
directory2 and the only defined roles are BEGINNER and EXPERT.
If you want to restrict BEGINNERs from using resources in directory2, which
are true about the url and role tag(s) you should declare? (Choose all that apply.)

A. A single url tag should declare directory1 and a single role tag should
declare EXPERT.
B. A single url tag should declare directory2 and a single role tag should
declare EXPERT.
C. A single url tag should declare directory1 and a single role tag should
declare BEGINNER.
D. A single url tag should declare directory2 and a single role tag should
declare BEGINNER.
E. One url tag should declare ANY and its role tag should declare EXPERT,
and another url tag should declare directory2 and its role tag should
declare BEGINNER.
F. One url tag should declare both directories, and its role tag should declare
EXPERT, and another url tag should declare directory1 and its role tag
should declare BEGINNER.

Correct answer is D
I think answer should be B

A single url tag should declare directory2 and a single role tag should
declare EXPERT.


This would restrict the BEGINNER to make GET request to directory2
while the D would allow BEGINNER to make GET request to directory2
.

OCPJP 6.0 93%
OCPJWCD 5.0 98%
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

please help me fellow ranchers as I am going for exam tomorrow.
Prachi Pandey
Greenhorn

Joined: Aug 22, 2011
Posts: 13
Hey Mohit,

how was your exam and if possible do share me any questions if at all you can remember. I am gonna take exam too day after.
The questions you posted were from which mock test, would you mind sharing that with me ??

Thanks
Prachi
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1733
    
  25

@Prachi Pandey: This place is not for sharing real questions and it is NOT allowed to even talk about real exam questions! Read This. Mohit quotes the source of the posted questions.

@Mohit: Have you checked the errata (I think you are right), you can find them here: link

Regards,
Frits
Prachi Pandey
Greenhorn

Joined: Aug 22, 2011
Posts: 13
Oopsie I take my question back..... didnt read this clause before.. thanks for letting me know

Thanks
Prachi
Prachi Pandey
Greenhorn

Joined: Aug 22, 2011
Posts: 13
hey.. gave SCWCD today and scored 97%.. me happy !!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Final Mock Test Question 49,69, Head First and Servlets