How to use the concept of sessions in Project development
Hello all,
I want to introduce the concept of a session in my application to allow that a people with identification and password stored in my table in the database (sql server 2005) to understand the procedure of how the session takes place and how it is to be executed I wanted to have concrete examples if possible please let me know.
Thanks in Advance.
Re: How to use the concept of sessions in Project development
Web Object i.e. WBSessions when we think of then it have a timeout time, which by default is configured in the WOApplication configuration. This timeout time determines that current session would be for how much time the server will keep the session alive without any active requests. When the session times out, it will be garbage collected.
and to achieve this
Code:
Session session = (Session)session();
code will be considered.
Re: How to use the concept of sessions in Project development
Sessions may have many different types such as just one above mentioned and the session tracking.
Under session tracking for exa when any user is shopping on-line, it is a real annoyance that the Web server can't easily remember previous transactions. at that time shopping cart will be available where previously measured transactions are kept in remembrance, as well as there are option can be available such as cookies, URL Rewriting, Hidden form fields. etc.
Re: How to use the concept of sessions in Project development
Quote:
What is a Session ?
when a user makes a page request to the server, the server creates a temporary session to identify that user. So when that same user goes to another page on that site, the server identifies that user.
So session would be a small and temporary unique connection between a server and the user accessing that page for the time being, enabling it to identify that user across multiple page requests or visits to that site.
Methods of HttpSession Interface
- getAttribute(), getAttributeNames(), setAttribute(), removeAttribute() These methods are used to set, get and remove objects from a user session.
- getId()
- getCreationTime()
- getLastAccessedTime()
- isNew()
- invalidate()
with all the above method user can achieve the different kinds of sessions in his projects.