单项选择题Which is a benefit of precompiling a JSP page?()

A.It avoids initialization on the first request.
B.It provides the ability to debug runtime errors in the application.
C.It provides better performance on the first request for the JSP page.
D.It avoids execution of the _jspService method on the first request.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

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?()


A.<!-- this is a comment -->
B.<% // this is a comment %>
C.<%-- this is a comment --%>
D.<% /** this is a comment **/ %>

2.多项选择题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>

4.多项选择题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>

5.多项选择题

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

6.单项选择题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

9.多项选择题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.

10.多项选择题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>

最新试题

You need to create a JSP that generates some JavaScript code to populate an array of strings used on the client-side.Which JSP code snippet will create this array?()

题型:单项选择题

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

题型:问答题

Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()

题型:多项选择题

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

题型:单项选择题

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()

题型:多项选择题

Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()

题型:单项选择题

Which element of a web application deployment descriptor  element is required?()

题型:单项选择题

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

题型:单项选择题

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

题型:单项选择题

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

题型:问答题