9

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

2
  • Why can't you use the request object? Commented Jan 16, 2010 at 7:21
  • What do you want to do with the session in the servlet context? Commented Jan 16, 2010 at 7:32

1 Answer 1

13

No, it's not possible to get the session from the ServletContext.The point of the ServletContext is to get application scope attributes rather than session scope.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.