Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8777051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:12:02+00:00 2026-06-13T19:12:02+00:00

I was revising the concept of Session Objects in JSP & ASP.Net. I was

  • 0

I was revising the concept of Session Objects in JSP & ASP.Net.
I was confused, ‘when an actual Session Object is created?’
Until recently I thought it was created when a user logs into his account, But now I read in the books that its implicitly created when the user visits any page on your site.

So when is it actually created? And are JSP sessions different from Website User Account sessions?

If the latter is correct, Is a second new Session created when a user actually logs into his account, and the previous session destroyed?
eg: A shopping site may allow a user to select many items & ‘Add to My Cart’. What happens to this data after he logs in. Is a new session created internally after destroying the initial one?

If this seems confusing, then you can just specify how Session is typically implemented in real-world systems (as I’m a student)? When is the session typically started? What data is stored in it? What is the typical timeout you set and why?

My research: JSP sessions are abstract concepts and User account sessions are implementation specific. Both are different

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T19:12:04+00:00Added an answer on June 13, 2026 at 7:12 pm

    A session is typically implemented by

    • generating a unique token,
    • creating a Session object to hold session data and store it in a map, indexed by the unique token,
    • sending a session cookie containing this token to the browser.

    Each time a request comes in from this browser, it contains the cookie, and the container can thus retrieved the appropriate session from its internal map of sessions.

    So yes, a session can exist before a user is authenticated, or even without authentication at all. And when a user is authenticated, he keeps the same session. The only difference is that you typically add the user ID in the session, in order to associate the user with the session.

    You could thus, for example, let aninymous users shopping and add items to their cart in the session, and only ask them to authenticate once they need to pay (to retrieve their stored account). Or you could let them add items to their cart, and never authenticate them at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I encountered an issue while I was revising my session library today, and this
On the slides I am revising from it says the following: Live objects can
I am working on revising our office intranet site from .ASP under IIS5 to
Revising for php and cant seem to get this to print the values out
Im revising my auto-complete style search script. The site has 2 categories... movies and
I am revising for a Database course and I have the following question from
I'm am currently revising a plugin architecture so that it utilizes AppDomains. The main
I need some help revising this. It keeps only displaying 0s as the temp.
I'm revising the navigation of my news system and would like to do so
I'm revising my C++ skills for a machine learning project. So, I was working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.