Request , Session and Context Part - 2
Session Object vs Context Object :
Session Object :
One per user/machine
Objects available across requests
Perfect for login sessions and shopping carts
Every request object has a reference to the session object.

Context Object :
Across the entire application
Shared across servlets and users
Initialization code / Common bulletin board
Use the Context object
How to create session ?

Output:

Last updated
Was this helpful?