Originally posted by Bahadar Khan: In j2eeCertificate.com, I have seen this question and among those they have mentioned one of the correct answer as this: req.getSession().getServletContext(); However I couldn't find anywhere getting ServletContext out of Session! Please let me know if this is possible?
getServletContext public ServletContext getServletContext() Returns the ServletContext to which this session belongs. Returns: The ServletContext object for the web application Since: 2.3
Originally posted by Bahadar Khan: So I assume that getServletContext is a new addition in 2.4 Servlet API!