Recent Questions
.Net Framework : What is difference between string and stringbuilder?

What is difference between string and stringbuilder?

String is for simple string operations while StringBuilder is used to perform high manipulation stri....
Category: .Net Framework Date: 7/3/2010 1:55:44 PM
C# : Can we have a variables inside the interface?

Can we have a variables inside the interface?

No, we can have only methods, properties, indexers and enums inside the interface.
Category: C# Date: 7/3/2010 1:54:37 PM
C# : What is static class and what is use of this?

What is static class and what is use of this?

Static class we define when we do not want to create a object of class, all methods of static class ....
Category: C# Date: 7/3/2010 1:54:06 PM
OOPs Concepts : What is difference between overloading and overriding?

What is difference between overloading and overriding?

Having same name methods with different parameters is called overloading, while having same name and....
Category: OOPs Concepts Date: 7/3/2010 1:53:22 PM
.Net Framework : What is difference between Monitor.Enter and Monitor.TryEnter functions?

What is difference between Monitor.Enter and Monitor.TryEnter functions?

Monitor.Enter waits for the lock until it does not get it, while Monitor.TryEnter will request for l....
Category: .Net Framework Date: 7/3/2010 1:52:22 PM
JSP Interview Questions and Answers
<< Previous Question Next Question >>
Question: 598 Page Views: 

What approaches are used for Session Management in JSP ?



Posted By: Avi Date: 17 September 2009 06:24:36 AM
Answer:

Following approches can be used for Session Management in JSP:

1) Cookies:
Cookies are small text files that a web server sends to a browser and that browsers returns the cookie when it visits the same site again. In cookie the information is stored in the form of a name, value pair.

2) URL Rewriting:
In URL rewriting we append some extra information on the end of each URL that identifies the session. This URL rewriting can be used with the clients where cookie is disabled. It is a good practice to use URL rewriting. In this session ID information is embedded in the URL, which is recieved by the application through Http GET requests when the client clicks on the links embedded with a page.

3) Hidden form fields:
In hidden form fields are html "input" control with type="hidden". The data stored in these fields are included in get or post method, but this information will not be displyed in the page. In this session ID information would be embedded within the form as a hidden field and submitted with the Http POST method.

4) HttpSession object:
javax.servlet.http.HttpSession is an interface that provides a way to identify a user across more than one page request or visit to a web site and maintains session data in the site.


Posted By: eTechPlanet


Date: 17 September 2009 06:24:36 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
wNw93k