Assume session is an HttpSession, and is not referenced anywhere else in ServletA. Which two changes, taken together, ensure that value is equal to “Hello” on line 23? ()
A.A B.B C.C D.D E.E
单项选择题Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
A. The attribute foo is placed in the application B. A ServletContextListener registered for that servlet is notified C. A ServletAttributeListener registered for that servlet is notified D. An HttpSessionAttributeListener registered for that servlet is notified
单项选择题Whichisthe true choiceaboutthewebcontainerrequestprocessingmodel()?
A. The init method on a filter is called the first time a servlet mapped to that filter is invoked B. A filter defined for a servlet must always forward control to the next resource in the filter chain. C. Filters associated with a named servlet are applied in the order they appear in the web application deployment descriptor file D. If the init method on a filter throws an UnavailableException, then the container will make no further attempt to execute it
多项选择题Whichthe twoaretrueregardingawebapplicationclassloader?()
A. A web application may override the web container’s implementation classes B. A web application running in a J2EE product may override classes in the javax.* namespace C. A web application class loader may NOT override any classes in the java.* and javax.* namespace D. Resources in the WAR class directory or in any of the JAR files within the library directory may be accessed using the J2SE semantics of getResource E. Resources in the WAR class directory or in any of the JAR files within the library directory cannot be accessed using the J2SE semantics of getResource
单项选择题Within the web application deployment descriptor, which defines a valid JNDI environment entry()
A.A B.B C.C D.D
单项选择题Whichpath,relativetoawebapplication’sroot,identifiesthewebapplication’sdeploymentdescriptor?()
A. /conf/web.xml B. /WEB-INF/web.xml C. /conf/server.xml D. /META-INF/web.xml E. /WEB-INF/rules.xml F. /META-INF/server. Xml