Pitch your project

Random text


By admin Category Uncategorized, Posted February 21st, 2016
Sessions with Java EE

This is more of a backend article than a front end, So the Dutch team (some of you) might take a back seat on it. The HHS project is an exciting one as it employs all tools possible in the Java frameworks.

What are sessions?

If I was talking to a lay man off the street of Tom Mboya here in Nairobi or a bum in down town Amsterdam, I would ask them this question: “When you surf the web especially on shopping sites and you are tempted to view the details of an item say, PlayStation 4 console. Then you select the item and you go through the specs. After you done with that you go to a more general website like your local news channel. All of a sudden you see ads on the sidebars and footers the items you wanted to shop for and other related stuff, like FIFA 16 PS4 game and extra pad with headphones. That was magic huh? How did they know you visited their sites and they are now suggesting things for you to buy related to what you searched?”

Hence, sessions.

Sessions can be likened to a conversation between the server and client in that there is memory of the conversation if the ‘meet’ again. That memory aspect is referred to as state. Other protocols such as HTTP and Web Server are stateless, after the first conversation, subsequent conversations will be treated as new since the memory aspect is absent. A unique identifier is assigned to the request and response objects of both the client and server to make this possible.

Other ways of identifying users in the web

User Authentication

This is arguably the most common method but very ineffective. Users provide login credentials which are used to maintain a session. The downside of this is when one uses many browsers to log in to the same site.

URL Rewriting

This method appends the session parameter with every response and request making it tedious as it has to be tracked and monitored to avoid conflicts with other parameters.


These are objects generated by a server and stored in the client’s browser. If a client makes subsequent requests to the web server, the cookie object is added to the request header and it used to maintain that session. If a client wishes to disable cookies on their browser, this method is rendered null and void.

That’s a little insight to what happens on this side…. Have fun guys!!!Ngondi

Posted by Marvin Ngondi

Leave a Reply

Your email address will not be published. Required fields are marked *