单项选择题
Servlet A receives a request that it forwards to servlet B within another web application in the same web container. Servlet A needs to share data with servlet B and that data must not be visible to other servlets in A’s web application. In which object can the data that A shares with B be stored?()
A. HttpSession
B. ServletConfig
C. ServletContext
D. HttpServletRequest
E. HttpServletResponse
相关考题
-
多项选择题
Forwhichthreeeventscanwebapplicationeventlistenersberegistered?()
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 -
多项选择题
AdeveloperchoosestoavoidusingSingleThreadModelbutwantstoensurethatdataisupdatedinathread-safemanner.Whichtwocansupportthisdesigngoal?()
A. Store the data in a vocal 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. -
多项选择题
ARequestDispatchercanbeobtainedfromwhichtwoobjects?()
A. ServletConfig
B. ServletContext
C. HttpServletRequest
D. HttpServletResponse
