Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
.
 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me fellow ranchers as I am going for exam tomorrow.
 
Prachi Pandey
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Pie
Posts: 2534
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oopsie I take my question back..... didnt read this clause before.. thanks for letting me know

Thanks
Prachi
 
Prachi Pandey
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey.. gave SCWCD today and scored 97%.. me happy !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic