Servlet A received a request that it forwards to Servlet B within anthor 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 servlet in the A's web application.
in whici object can the data that A shares with B be stored? A.HttpSession B.ServletConfig C.ServletConext D.HttpServletRequest E.HttpServletResponse
and i think the answer is ServletConfig, Cloud someone tell me is it correct? thanks
I think it is HttpServletRequest. As you passing a request to the Sevlet to different web application, you can not share information through HttpSession, ServletConfig or ServletContext. The Data in HttpServletRequest is available to that request only and if you are not passing this request parameter to any other Servlet/JSP in A's web application, this information will not available to them.
I think it is HttpServletRequest. As you passing a request to the Sevlet to different web application, you can not share information through HttpSession
Session CAN be used across multiple applications within same web container as long as request is same. However, this is an incorrect answer in the above question because other servlets should not be able to see data.
Please confirm my understanding. Thanks!
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------