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