单项选择题
Servlet A forwarded a request to servlet B using the forward method of RequestDispatcher.
What attributein B’s request object contains the URI of the original request received by servlet A?()
A.REQUEST_URI
B.javax.servlet.forward.request_uri
C.javax.servlet.forward.REQUEST_URI
D.javax.servlet.request_dispatcher.request_uri
E.javax.servlet.request_dispatcher.REQUEST_URI
相关考题
-
单项选择题
Given a Filter class definition with this method: 21.public void doFilter(ServletRequest request, 22.ServletResponse response, 23.FilterChain chain) 24.throws ServletException, IOException { 25.// insert code here26. } Which should you insert at line 25 to properly invoke the next filter in the chain,or the target servlet if thereare no more filters?()
A.chain.forward(request, response);
B.chain.doFilter(request, response);
C.request.forward(request, response);
D.request.doFilter(request, response); -
单项选择题
Click the Exhibit button. Given the web application deployment descriptor elements: 11. 12.ParamAdder 13.com.example.ParamAdder 14.... 31. 32.ParamAdder 33.Destination 34.... 55. 56.Destination 57./dest/Destination 58. What is the result of a client request of the Source servlet with no query string?()
A.The output "filterAdded = null" is written to the response stream.
B.The output "filterAdded = addedByFilter" is written to the response stream.
C.An exception is thrown at runtime within the service method of the Source servlet.
D.An exception is thrown at runtime within the service method of the Destination servlet. -
多项选择题
Given: String value = getServletContext().getInitParameter("foo"); in an HttpServlet and a web applicationdeployment descriptor that contains: <context-param> <param-name>foo</param-name> <param-value>frodo</param-value> </context-param> Which two are true?()
A.The foo initialization parameter CANNOT be set programmatically.
B.Compilation fails because getInitParameter returns type Object.
C.The foo initialization parameter is NOT a servlet initialization parameter.
D.Compilation fails because ServletContext does NOT have a getInitParameter method.
E.The foo parameter must be defined within theelement of the deployment descriptor.
