单项选择题

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 Diving
23.<!-- 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?()

A.${hobbies[hobbyEnum[N]}
B.${hobbies[paramValues.hobbyEnum[N]]}
C.${hobbies[paramValues@’hobbyEnum’@N]}
D.${hobbies.get(paramValues.hobbyEnum[N])}
E.${hobbies[paramValues.hobbyEnum.get(N)]}


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.
Which two properly set the title in this scenario?()

A.<title>${titleStr}</title>
B.<title>${initParam.titleStr}</title>
C.<title>${params[0].titleStr}</title>
D.<title>${paramValues.titleStr}</title>
E.<title>${initParam[’titleStr’]}</title>

5.单项选择题Which is true about the web container request processing model?()

A.The init method on a filter is called the first time a servlet mapped to that filter is invoked.
B.A filter defined for a servlet must always forward control to the next resource in the filter chain.
C.Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file.
D.If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it.

6.多项选择题Which three are true about servlet filters?()

A.A filter must implement the destroy method.
B.A filter must implement the doFilter method.
C.A servlet may have multiple filters associated with it.
D.A servlet that is to have a filter applied to it must implement the javax.servlet.FilterChain interface.
E.A filter that is part of a filter chain passes control to the next filter in the chain by invoking the FilterChain.forward method.

8.单项选择题Which ensures that a JSP response is of type "text/plain"?()

A.<%@ page mimeType="text/plain" %>
B.<%@ page contentType="text/plain" %>
C.<%@ page pageEncoding="text/plain" %>
D.<%@ page contentEncoding="text/plain" %>
E.<% response.setEncoding("text/plain"); %>

9.单项选择题

You are building your own layout mechanism by including dynamic content for the page’s header and footersections. The footer is always static, but the header generates the <title> tag that requires the page name tobe specified dynamically when the header is imported.
Which JSP code snippet performs the import of theheader content?()

 

A.<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:include>
B.<jsp:import page=’/WEB-INF/jsp/header.jsp’><jsp:param name=’pageName’ value=’Welcome Page’ /> </jsp:import>
C.<jsp:include page=’/WEB-INF/jsp/header.jsp’><jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:include>
D.<jsp:import page=’/WEB-INF/jsp/header.jsp’>. <jsp:attribute name=’pageName’ value=’Welcome Page’ /> . </jsp:import>

最新试题

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

题型:单项选择题

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

题型:单项选择题

Which two are valid and equivalent?()

题型:多项选择题

Which is a benefit of precompiling a JSP page?()

题型:单项选择题

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

题型:单项选择题

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

题型:单项选择题

A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()

题型:单项选择题

A web application allows the HTML title banner to be set using a servlet context initialization parametercalled titleStr.Which two properly set the title in this scenario?()

题型:多项选择题

All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()

题型:单项选择题