This week's giveaway is in the Spring forum.
We're giving away four copies of Microservices Testing (Live Project) and have Chris Love & Andres Sacco on-line!
See this thread for details.
Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Sapna Mandhare

Greenhorn
+ Follow
since Jun 14, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sapna Mandhare

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
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
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