单项选择题

Your company has a corporate policy that prohibits storing a customer’s credit card number in anycorporate database. However, users have complained that they do NOT want to re- enter their credit cardnumber for each transaction. Your management has decided to use client-side cookies to record the user’scredit card number for 120 days. Furthermore, they also want to protect this information during transit fromthe web browser to the web container; so the cookie must only be transmitted over HTTPS.
Which codesnippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user’s webbrowser?()

A.
B.
C.
D.


您可能感兴趣的试卷

你可能感兴趣的试题

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

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

5.单项选择题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"); %>

6.单项选择题

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>

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

9.单项选择题

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 **/ %>

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

最新试题

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

题型:问答题

In which three directories, relative to a web application’s root, may a tag library descriptor file reside whendeployed directly into a web application?()

题型:多项选择题

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

题型:单项选择题

Your company has a corporate policy that prohibits storing a customer’s credit card number in anycorporate database. However, users have complained that they do NOT want to re- enter their credit cardnumber for each transaction. Your management has decided to use client-side cookies to record the user’scredit card number for 120 days. Furthermore, they also want to protect this information during transit fromthe web browser to the web container; so the cookie must only be transmitted over HTTPS.Which codesnippet creates the "creditCard" cookie and adds it to the out going response to be stored on the user’s webbrowser?()

题型:单项选择题

Which three are true about servlet filters?()

题型:多项选择题

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

题型:多项选择题

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 two are valid and equivalent?()

题型:多项选择题

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

题型:问答题