找考题网-背景图
单项选择题

Your company has a corporate policy that prohibits stor……

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.

热门试题

单项选择题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?()

A.Dispatcher view=context.getDispatcher(viewURL);view.forward Request(request, response);
B.Dispatcher view=request.getDispatcher(viewURL);view.forward Request(request, response);
C.RequestDispatcher view. =context.getRequestDispatcher(viewURL);view.forward(request,response);
D.RequestDispatcher view=request.getRequestDispatcher(viewURL);view.forward(request, response);