ServletContext « Session « JSP-Servlet Q&A

1. ServletContext and Session object

Is the ServletContext and Session object which we get from request object (HttpServletRequest) behave the same ?

2. Session object using ServletContext

Is there any way to get an object which will be there throughout the session from ServletContext object??

3. How can i achieve active(current) UserContext in some classes?

I have a problem. I hope somebody can help me. I want create UserContext when Servlet HttpListener SessionInitialize Method running. And after i want to call UserContext in Java Class. Example : protected ...

4. Why do I need an HttpSession to get the ServletContext?

In the Java Servlet API, the only way to get the ServletContext is through an instance of HttpSession (Javadoc). What if I don't want to create a session and only ...

6. Sharing Session across ServletContext

7. ServletContext and Session

Did you read further into the spec where it gets to the part about Sessions and a Distributed Environment (SRV.7.7.2) "Within an application marked as distributable, all requests that are par of a session must be handled by one virtual machine at a time. The container must be able to handle all objects placed into instances of HttpSession class using setAttribute()" ...

8. Session Attributes and ServletContext

A ServletContext represents one web application. A context is the root of the web application. In a url like http://domain ort/ctx, ctx is the context root of the application. The web application will usually be deployed as a war with the same name 'ctx' or in exploded directory format where the top level directory name is 'ctx'. A j2ee web container ...