单项选择题
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.
相关考题
-
多项选择题
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. -
多项选择题
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 theelement
C.Include aelement in the web application deployment descriptor
D.configure a listener in the application deployment descriptor, using theelement
E.Include a class implementing ServletContextListener as part of the web application deploymen -
单项选择题
Your web site has many user-customizable features, for example font and color preferences on web pages.Your IT department has already built a subsystem for user preferences using the Java SE platform’s lang.util.prefs package APIs, and you have been ordered to reuse this subsystem in your web application. Youneed to create an event listener that constructs the preferences factory and stores it in the applicationscope for later use. Furthermore, this factory requires that the URL to a database must be declared in thedeployment descriptor like this: 42. 43.prefsDbURL 44. 45.jdbc:pointbase:server://dbhost:4747/prefsDB 46. 47. Which partial listener class will accomplish this goal?()
A.
B.
C.
D.
