單項(xiàng)選擇題

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


您可能感興趣的試卷

你可能感興趣的試題

2.單項(xiàng)選擇題 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.

3.多項(xiàng)選擇題

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 the  element of the deployment descriptor.

4.多項(xiàng)選擇題For which three events can web application event listeners be registered?()

A.When a session is created
B.After a servlet is destroyed
C.When a session has timed out
D.When a cookie has been created
E.When a servlet has forwarded a request
F.When a session attribute value is changed

5.多項(xiàng)選擇題

Your web application uses a simple architecture in which servlets handle requests and then forward to aJSP using a request dispatcher. You need to pass information calculated in the servlet to the JSP for view generation.This information must NOT be accessible to any other servlet,JSP or session in the webapp.
Which two techniques can you use to accomplish this goal?()

A.Add attributes to the session object.
B.Add attributes on the request object.
C.Add parameters to the request object.
D.Use the pageContext object to add request attributes.
E.Add parameters to the JSP’s URL when generating the request dispatcher.

最新試題

Given tutorial.jsp:2.EL Tutorial3.Example 14.5.Dear ${my:nickname(user)}6.Which, when added to the web application deployment descriptor,ensures that line 5 is included verbatimin the JSP output?()

題型:單項(xiàng)選擇題

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

題型:問答題

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

題型:單項(xiàng)選擇題

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

題型:單項(xiàng)選擇題

Given a web application in which the request parameter productID contains a product identifier.Which twoEL expressions evaluate the value of the productID?()

題型:多項(xiàng)選擇題

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

題型:單項(xiàng)選擇題

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.

題型:問答題

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

題型:問答題

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35.Which two EL code snippets will return true for this condition? ()

題型:多項(xiàng)選擇題