• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SCWCD 1.5 HFSJ Final Mock exam queries

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please explain the answers for below questions in HFSJ (2nd edition) SCWCD 1.5 ?
Q 21 page - 838
Q 26 page - 841
Q 69 page - 863
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how about you post the questions.
 
Sapna Mandhare
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here are the q's:
Q 69)Your web application has a valid dd with a single <security-constraint> tag.Within the 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 tags(s) you should declare?
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 given is: D

Q21) You have created a valid directory structure and a valid WAR file for your Java EE web application.Given that
- ValidApp.war is the name of the WAR file.
- WARdir represents the directory that must exist in every WAR file.
- APPdir represents the directory that must exist in every web application.
A)The actual name of WARdir is not predictable.
B)The actual name of your application is not predictable.
C)In this directory structure, APPdir will exist inside WARdir.
D)In this directory structure, the applications DD will reside in the same directory as WARdir.
E)Placing your application in a WAR file provides the option for the conatiner to perform additional runtime checks not otherwise guaranteed.
Correct answer given is:B
Here i feel that WARdir must correspond to WEB-INF? But what does APPdir correspond to?What are the mandatory things in WAR file and in web application?

Q26)Given:
<%@ taglib uri="http://....jstl/core" prefix="c">
<% java.uti.List books = new jva.util.ArrayList();
//add line here
request.setAttribute("myfavbooks",books);
%>
<c:choose>
<c:when test="${not empty myfavbooks}">
My favourite books are:
//some code to display book list
</c:when>
<c therwise>
i have not selected any favourite book.
</c therwise>
</c:choose>
Which of the following lines of code if inserted independently on line 5 will cause text in <c therwise> to display?
A)books.add("");
B)books.add(null);
C)books.clear();
D)books.add("Head first");
E)books =null;
Correct answer given is:B and D
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q 69 page - 863:
i think the correct answer should be B because which role is specified in the xml is allowed to access the resource.

Q 26 page - 841
HF got another typo then . The correct answer should be C & E

Q 21 page - 838
WARDir = META-INF
APPDir = WEB-INF
and B is a correct answer because the spec said that deployed web app doesnt need to be equals to war file name although many containers did that.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had very bad exp with this mock exam...see my post https://coderanch.com/t/177392/java-Web-Component-SCWCD/certification/HFSJ-Mock-Exam-highly-Disappointing
 
Sapna Mandhare
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Pham for the answers.
Pham,
Regarding Q21 as per the answer it means:
META-INF is the only required directory in war file.It is ok if we do not have WEB-INF directory and DD in every war file.
WEB-INF directory and DD is required in web application.Correct me if I am wrong?


I also found another post regarding errors in mock exam errata section:
https://coderanch.com/t/143763/Mock-Exam-Errata/certification/HFSJ-nd-edition-Mock-exam
 
Pham Hoai Van
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it's able to deploy a war file without any of web.xml, meta-inf or web-inf. So they're all not required for a succeful deployment.
[ June 17, 2008: Message edited by: Pham Hoai Van ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic