單項選擇題 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.


您可能感興趣的試卷

你可能感興趣的試題

1.多項選擇題

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.

2.多項選擇題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

3.多項選擇題

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.

4.多項選擇題

A developer chooses to avoid using SingleThreadModel but wants to ensure that data is updated in athread-safe manner.
Which two can support this design goal?()

A.Store the data in a local variable.
B.Store the data in an instance variable.
C.Store the data in the HttpSession object.
D.Store the data in the ServletContext object.
E.Store the data in the ServletRequest object.

5.單項選擇題Which JSTL code snippet can be used to import content from another web resource?()

A.<c:import url="foo.jsp"/>
B.<c:import page="foo.jsp"/>
C.<c:include url="foo.jsp"/>
D.<c:include page="foo.jsp"/>

最新試題

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

題型:單項選擇題

Which ensures that a JSP response is of type "text/plain"?()

題型:單項選擇題

Which two are valid and equivalent?()

題型:多項選擇題

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

題型:多項選擇題

Which three are true about servlet filters?()

題型:多項選擇題

A web browser need NOT always perform a complete request for a particular page that it suspects mightNOT have changed. The HTTP specification provides a mechanism for the browser to retrieve only a partialresponse from the web server; this response includes information, such as the Last-Modified date but NOTthe body of the page.Which HTTP method will the browser use to retrieve such a partial response?()

題型:單項選擇題

All of your JSPs need to have a link that permits users to email the web master. This web application islicensed to many small businesses, each of which have a different email address for the web master. Youhave decided to use a context parameter that you specify in the deployment descriptor, like this:42.<context-param>43.<param-name>webmasterEmail</param-name>44.<param-value>master@example.com</param-value>45.</context-param>Which JSP code snippet creates this email link?()

題型:單項選擇題

Click the Exhibit button.The attribute "name" has a value of "Foo,"What is the result if this tag handler’s tag is invoked?()

題型:單項選擇題

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

題型:單項選擇題

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

題型:多項選擇題