aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes SCWCD 1.5 HFSJ Final Mock exam queries 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 "SCWCD 1.5 HFSJ Final Mock exam queries" Watch "SCWCD 1.5 HFSJ Final Mock exam queries" New topic
Author

SCWCD 1.5 HFSJ Final Mock exam queries

Sapna Mandhare
Greenhorn

Joined: Jun 14, 2008
Posts: 3
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
Musab Al-Rawi
Ranch Hand

Joined: Aug 06, 2007
Posts: 231
how about you post the questions.


SCBCD - SCWCD - SCJD - SCJP - OCA
Sapna Mandhare
Greenhorn

Joined: Jun 14, 2008
Posts: 3
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
Pham Hoai Van
Greenhorn

Joined: May 20, 2008
Posts: 15
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.
gopal venu
Ranch Hand

Joined: Jan 06, 2006
Posts: 55
I had very bad exp with this mock exam...see my post http://www.coderanch.com/t/177392/java-Web-Component-SCWCD/certification/HFSJ-Mock-Exam-highly-Disappointing
Sapna Mandhare
Greenhorn

Joined: Jun 14, 2008
Posts: 3
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:
http://www.coderanch.com/t/143763/Mock-Exam-Errata/certification/HFSJ-nd-edition-Mock-exam
Pham Hoai Van
Greenhorn

Joined: May 20, 2008
Posts: 15
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 ]
 
 
subject: SCWCD 1.5 HFSJ Final Mock exam queries