單項(xiàng)選擇題

Click the Exhibit button.

The resource requested by the RequestDispatcher is available and implemented by the Destination Servlet.
What is the result?()

A.An exception is thrown at runtime by SourceServlet.
B.An exception is thrown at runtime by DestinationServlet.
C.Only "hello from dest" appears in the response output stream.
D.Both "hello from source" and "hello from dest" appear in the response output stream.


您可能感興趣的試卷

你可能感興趣的試題

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

You want to create a filter for your web application and your filter will implement javax.servlet.Filter.
Which two statements are true?()

A.Your filter class must implement an init method and a destroy method.
B.Your filter class must also implement javax.servlet.FilterChain.
C.When your filter chains to the next filter, it should pass the same arguments it received in its doFiltermethod.
D.The method that your filter invokes on the object it received that implements javax.servlet.FilterChaincan invoke either another filter or a servlet.
E.Your filter class must implement a doFilter method that takes, among other things, anHTTPServletRequest object and an HTTPServletResponse object.

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

A developer wants a web application to be notified when the application is about to be shut down.
Which two actions are necessary to accomplish this goal?()

A.Include a listener directive in a JSP page
B.configure a listener in the TLD file using the  element
C.Include a  element in the web application deployment descriptor
D.configure a listener in the application deployment descriptor, using the  element
E.Include a class implementing ServletContextListener as part of the web application deploymen

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

The sl:shoppingList and sl:item tags output a shopping list to the response and are used as follows:
11.<sl:shoppingList>
12.<sl:item name="Bread" />
13.<sl:item name="Milk" />
14.<sl:item name="Eggs" />
15.</sl:shoppingList>
The tag handler for sl:shoppingList is ShoppingListTag and the tag handler for sl:item is ItemSimpleTag.ShoppingListTag extends BodyTagSupport and ItemSimpleTag extends SimpleTagSupport.Which is true?()

A.ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.
B.ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.
C.It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.
D.ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.
E.ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.

最新試題

Which is true about the web container request processing model?()

題型:?jiǎn)雾?xiàng)選擇題

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)柎痤}

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

題型:?jiǎn)雾?xiàng)選擇題

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

題型:?jiǎn)雾?xiàng)選擇題

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

題型:?jiǎn)雾?xiàng)選擇題

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies:20.<input type=’radio’ name=’hobbyEnum’ value=’HIKING’>Hiking <br>21.<input type=’radio’ name=’hobbyEnum’ value=’SKIING’>Skiing <br>22.<input type=’radio’ name=’hobbyEnum’ value=’SCUBA’>SCUBA Diving23.<!-- and more options -->After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname.Which EL code snippet will display Nth element of the user’s selected hobbies?()

題型:?jiǎn)雾?xiàng)選擇題

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

題型:?jiǎn)雾?xiàng)選擇題

Which element of a web application deployment descriptor  element is required?()

題型:?jiǎn)雾?xiàng)選擇題