I'm creating a website using JSP, HTML pages and MS SQL.
Can u please tell me how to create a session and how to retrive it each time while checking user status i.e how to check if user is signed in or not?

Please help.
Thank you.

AFAIK, a session object is automatically created as soon as a request to a resource is made. In the Servlet API, you can get hold of the session object using request.getSession(), which grabs hold of the session for the current request. The way the session is maintained i.e. either by using cookies of session identifiers is generally not a concern for the developer though the latter is a much better solution. This might prove to be a good read.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.