You want to allow one set of roles to POST to a resource and another set of roles to GET it. Which two configuration options should you use? (Choose two.)
A.
two separate @HttpMethodConstraints annotations and sets of roles
B.
a single @HttpMethodContstraint annotation and a map of method to roles
C.
two <web-resource-collection> with different <http-method> in the deployment descriptor
D.
a single <web-resource-collection> with two <auth-constraint> with different <http-method> in the deployment descriptor
Answer:
B,D
User Votes:
A
50%
B 1 votes
50%
C 1 votes
50%
D 1 votes
50%
Discussions
0/ 1000
Question 2
Given the code fragment:
Assuming this bean is used only in the code fragment above, how long will the injected Bean instance be available?
A.
for the lifetime of the enterprise application
B.
for the lifetime of the request
C.
for the lifetime of the session
D.
for the lifetime of the Service object
Answer:
D
User Votes:
A
50%
B
50%
C 1 votes
50%
D 1 votes
50%
Discussions
0/ 1000
Question 3
Which is a valid description of REST?
A.
REST provides the same architectural properties as SOAP.
B.
REST is a library that is part of JEE called JAX-RS.
C.
REST is the conventional way of interacting with information resources.
D.
REST is a Web Services standard supported by JEE and JAX-RS.
Which annotation do you use on line 1 to ensure that clients immediately time out when attempting to concurrently invoke callMethod () while another client is already accessing the bean?
A.
@AccessTimeout (value = 1, unit = TimeUnit.SECONDS)
Which statement is true about the relationship between HTTP and WebSockets?
A.
A WebSocket connection is a bi-directional HTTP session with message-handling support.
B.
A WebSocket connection is initialized with an HTTP handshake.
C.
A WebSocket connection can be initialized by either client or server.
D.
A WebSocket connection uses HTTP protocol to exchange data with the browser.
Answer:
D
User Votes:
A
50%
B
50%
C
50%
D 1 votes
50%
Discussions
0/ 1000
Question 6
A Java EE application that uses an EJB container must communicate with a legacy system developed using non-Java technologies. Which two Java EE technologies can be used in the integration tier of the application? (Choose two.)
A.
JMS
B.
JSF
C.
JPA
D.
JCA
Answer:
A,B
User Votes:
A 1 votes
50%
B 1 votes
50%
C
50%
D
50%
Discussions
0/ 1000
Question 7
Which code snippet indicates that the page you are designing is capable of handling errors?
A.
<%@page errorPage=“errorHandler.jsp”%>
B.
<%= requestScope[‘javax.servlet.error’] !=null %>
C.
<%@page isErrorPage=“true”%>
D.
<c:set var=“errorHandler” value=“true”/>
Answer:
C
User Votes:
A 1 votes
50%
B
50%
C 1 votes
50%
D
50%
Discussions
0/ 1000
Question 8
Which two elements CANNOT be injected by using an @Inject annotation? (Choose two.)
You have been assigned to the Widget Editor portion of an application. It contains a Widget Editor Facelet page, the Widget class, and a simple WidgetEditor backing bean, which contains a reference to the current Widget instance. Given the code fragment from the Widget class:
Given the code fragment from the Facelet page:
The page displays Conversion Error when a user fills out all the form fields and clicks the Save button. Which step do you perform to fix this problem?
A.
Replace Line 1 with:<h: inputText id=createDatevalue=#{widgetEditor.widget.createdDate}converter=java.util.Date/>
B.
Enclose the code fragment within the <f:view/> tag
C.
Insert <f:convertDateTime”/> at Line 1
D.
Replace Line 1 with:<h:inputText id=createDatevalue=#{widgetEditor.widget.createdDate}><f:convertDateTime pattern=dd-mm- yyyy/></h:inputText>
Answer:
D
User Votes:
A
50%
B
50%
C
50%
D 1 votes
50%
Discussions
0/ 1000
Question 12
You created two filters for your web application by using the @WebFilter annotation, one for authorization and the other for narrowing results by the provided search criteria. The authorization filter must be invoked first. How can you specify this?
A.
setting the priority attribute of the @WebFilter annotation for each of the filters
B.
placing the filter mapping elements in the required order in the web.xml deployment descriptor
C.
placing @WebFilterMapping annotations in the required order
D.
specifying the filter precedence order by using the @Priority annotation
Answer:
A
User Votes:
A 1 votes
50%
B
50%
C
50%
D 1 votes
50%
Discussions
0/ 1000
Question 13
Which of these can be a JPA entity?
A.
Enum type
B.
Abstract class
C.
Interface type
D.
Final class
Answer:
A
User Votes:
A 1 votes
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 14
Which two features are provided by the JSTL Core library for a JSP? (Choose two.)