单项选择题
Which HttpSession method stores an object in a session?()
A. put(String name. Object value)
B. set(String name. Object value)
C. setAttribute(String name. Object value)
D. putAttribute(String name. Object value)
E. addAttribute(String name. Object value)
相关考题
-
单项选择题
Whichelementistheparentofthetaginthewebapplicationdeploymentdescriptor?()
A. <web-app>
B. <filters>
C. <servlet>
D. <filter-list> -
单项选择题
Which retrieves the value associated with “foo” from within an HttpServlet?()
A. String value = getServletConfig( ).getParameter(“foo”);
B. String value = getServletContext( ).getAttribute(“foo”);
C. Object value = getServletContext( ).getInitParameter(“foo”);
D. String value = getServletContext( ).getInitParameter(“foo”) -
单项选择题
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 exeption is thrown at runtime within the service method of the Destination servlet.
