多项选择题Which two are valid and equivalent?()

A.<%! int i; %>
B.<%= int i; %>
C.<jsp:expr>int i;</jsp:expr>
D.<jsp:scriptlet>int i;</jsp:scriptlet>
E.<jsp:declaration>int i;</jsp:declaration>


您可能感兴趣的试卷

你可能感兴趣的试题

2.多项选择题Given that a scoped attribute cart exists only in a user’s session, which two,taken independently,ensurethe scoped attribute cart no longer exists?()

A.${cart = null}
B.<c:remove var="cart" />
C.<c:remove var="${cart}" />
D.<c:remove var="cart" scope="session" />
E.<c:remove scope="session">cart</c:remove>

3.多项选择题

Given in a single JSP page:
<%@ taglib prefix=’java’ uri=’myTags’ %>
<%@ taglib prefix=’JAVA’ uri=’moreTags’ %> 
Which two are true?()

A.The prefix ’java’ is reserved.
B.The URI ’myTags’ must be properly mapped to a TLD file by the web container.
C.A translation error occurs because the prefix is considered identical by the web container.
D.For the tag usage , the tag1 must be unique in the union of tag names in ’myTags’ and’moreTags’.

4.单项选择题Which interface must a session attribute implement if it needs to be notified when a web container persistsa session?()

A.javax.servlet.http.HttpSessionListener
B.javax.servlet.http.HttpSessionBindingListener
C.javax.servlet.http.HttpSessionAttributeListener
D.javax.servlet.http.HttpSessionActivationListener

7.多项选择题Which two statements are true about using the isUserInRole method to implement security in a Java EEapplication?()

A.It can be invoked only from the doGet or doPost methods.
B.It can be used independently of the getRemoteUser method.
C.Can return "true" even when its argument is NOT defined as a valid role name in the deployment descriptor.
D.Using the isUserInRole method overrides any declarative authentication related to the method in which it is invoked.

8.多项选择题Which two are required elements for the  element of a web applicationdeployment descriptor?()

A.<realm-name>
B.<url-pattern>
C.<description>
D.<web-resource-name>
E.<transport-guarantee>

9.单项选择题Which element of a web application deployment descriptor  element is required?()

A.<realm-name>
B.<auth-method>
C.<security-role>
D.<transport-guarantee>
E.<web-resource-collection>

10.多项选择题Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()

A.Every  tag must have at least one  tag.
B.A  tag can have many  tags.
C.A given  tag can apply to only one  tag.
D.A given  tag can contain from zero to many  tags.
E.It is possible to construct a valid  tag such that,for a given resource,no user rolescan access that resource.

最新试题

The JSP developer wants a comment to be visible in the final output to the browser.Which comment styleneeds to be used in a JSP page?()

题型:单项选择题

You are building a web application with a scheduling component. On the JSP, you need to show the currentdate, the date of the previous week, and the date of the next week. To help you present this information,you have created the following EL functions in the ’d’ namespace: name: curDate; signature: java.util.DatecurrentDate() name: addWeek; signature: java.util.Date addWeek(java.util.Date, int) name: dateString;signature:java.util.String getDateString(java.util.Date)Which EL code snippet will generate the string for the previousweek?

题型:单项选择题

Click the ’Select and Place’ button.Place the events in the order they occur.

题型:问答题

Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()

题型:单项选择题

Your IT department is building a lightweight Front Controller servlet that invokes an application logic objectwith the interface:public interface ApplicationController {public String invoke(HttpServletRequest request)}The return value of this method indicates a symbolic name of the next view. From this name, the FrontController servlet looks up the JSP URL in a configuration table. This URL might be an absolute path or apath relative to the current request. Next, the Front Controller servlet must send the request to this JSP togenerate the view. Assume that the servlet variable request is assigned the current HttpServletRequestobject and the variable context is assigned the webapp’s ServletContext. Which code snippet of the FrontController servlet accomplishes this goal?()

题型:单项选择题

Click the ’Select and Place’ button.Place the events in the order they occur.

题型:问答题

Which ensures that a JSP response is of type "text/plain"?()

题型:单项选择题

Click the ’Select and Place’ button.Place the events in the order they occur.

题型:问答题

Click the 'Select and Place' button.Place the events in the order they occur.

题型:问答题

Which is true about the web container request processing model?()

题型:单项选择题