Given a header in an HTTP request:X-Retries:4
Which two retrieve the value of the header from a given HttpServletRequest request?()
A.Request.getHeader("X-Retries")
B.Request.getIntHeader("X-Retries")
C.Request.getRequestHeader("X-Retries")
D.Request.getHeaders("X-Retries").get(0)
E.Request.getRequestHeaders("X-Retries").get(0)
您可能感興趣的試卷
你可能感興趣的試題
A.session.getResource("/WEB-INF/myconfig.xml")
B.request.getResource("/WEB-INF/myconfig.xml")
C.context.getResource("/WEB-INF/myconfig.xml")
D.getClass().getResource("/WEB-INF/myconfig.xml")
You are creating a web form with this HTML:
11.<form action="sendOrder.jsp">
12.<input type="text" name="creditCard">
13.<input type="text" name="expirationDate">
14.<input type="submit">
15.</form>
Which HTTP method is used when sending this request from the browser?()
A.GET
B.PUT
C.POST
D.SEND
E.FORM
A.It encapsulates component lookup procedures.
B.It increases source code duplication and decreases reuse.
C.It improves client performance by caching context and factory objects.
D.It degrades network performance due to increased access to distributed lookup services.
A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet.
Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()
A.Facade
B.View Helper
C.Transfer Object
D.Intercepting Filter
E.Composite Facade
最新試題
Which is true about the web container request processing model?()
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?()
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 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?()
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 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 element of a web application deployment descriptor element is required?()