session tracking:
is a process of maintaining / tracking the user data in a
session.
Session:
is an uninterrupted set of request and response between a client and server.
Advantages:
This helps improving the communication with the client also
gives convenience avoiding asking the same data repeatedly.
Example:
Ecommerce:
1). Flipcart
2) snapdeal
To maintain the cart all most every website is using session
tracking to remember the login user.
4.
HttpSession
·
This is one of approach of implementing session
tracking
·
In this approach we rewrite the URLs in the
response message adding the data to maintain for the next request
Note:
·
The Session
data here can be added into the URL
·
The url either in the form of QueryString or
path info
·
In case of query string we separate the URL with
? char
·
We can read this data as request parameter
·
In case of path info: first we need to configure
the URL pattern for the servlet as path mapping. And in the program we can read
it using getPathInfo() or
getRequestURI() method.
What are the limitations of this approach?
·
The Session
data is maintained in URL.
·
THE size and type of content is restricted
·
URL Rewriting is not secure
·
All the pages in the Session
should be dynamic
·
Increases the dependency: as all the possible
pages processing the request between the sources and target pages should
implement URL Rewriting
Note:
We prefer the URL Rewriting in case of maintaining
non-sensitive, small and simple text data in short length Sessions
session management (http://raj-servlets.blogspot.com/2013/09/session-management.html)
Session tracking types:
Session tracking types:
More articles on
Session management
or session
tracking
No comments:
Post a Comment