{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Session_Management-1.doc - Session Management Created by...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Session Management Created by: Masoom Budhia
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
What is session? A session is a conversation between the server and a client. A conversation consists series of continuous request and response. As we know that the Http is a stateless protocol, means that it can't persist the information. It always treats each request as a new request. In Http, client makes a connection to the server, sends the request., gets the response, and closes the connection. When there is a series of continuous request and response from a same client to a server, the server cannot identify from which client it is getting requests. When there is a need to maintain the conversational state, session tracking is needed. Session tracking is the capability of a server to maintain the current state of a single client’s sequential requests.
Image of page 2
Session Management In session management client first make a request for any servlet or any page, the container receives the request and generate a unique session ID. It gives the unique session ID back to the client along with the response. This ID gets stores on the client machine. Thereafter when the client request again sends a request to the server then it also sends the session Id with the request. There the container sees the Id (identifies the client) and sends back the request. For example, an online video store must be able to determine each visitor’s sequence of actions. Suppose a customer goes to your site to order a movie. The first thing he does is look at the available titles. When he has found the title he is interested in, he makes his selection. The problem now is determining who made the selection. Because each one of the client’s requests is independent of the previous requests, you have no idea who actually made the final selection.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Session tracking methods: 1.Hidden fields 2.URL rewriting 3.Cookies 4.Session tracking API
Image of page 4
Hidden fields Using hidden form fields is one of the simplest session tracking techniques. Hidden form fields are HTML input types that are not displayed when read by a browser. The following sample HTML listing includes hidden form fields: <FORM ACTION="someaction" METHOD="post"> <INPUT TYPE="hidden" NAME="tag1" VALUE="value1"> <INPUT TYPE="hidden" NAME="tag2" VALUE="value2"> <INPUT TYPE="submit"> </FORM>
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern