Share on Google+Share on Google+

Session In JSP

HTTP Protocol stands for Hyper Text Transfer Protocol. It is the protocol used to convey information of World Wide Web (WWW).

Session In JSP


  1. HTTP Protocol
    HTTP Protocol stands for Hyper Text Transfer Protocol. It is the protocol used to convey information of World Wide Web (WWW).
  2. Session Management in JSP
    In session management whenever a request comes for any resource, a unique token is generated by the server and transmitted to the client by the response object and stored on the client machine as a cookie.
  3. Cookies in JSP
    When cookie based session management is used, a token is generated which contains user's information, is sent to the browser by the server.
  4. JSP URL Rewriting
    URLRewriting can be used in place where we don't want to use cookies. It is used to maintain the session.
  5. JSP Hidden Form Fields
    It is one of the way to maintain the session. In hidden form fields the html entry will be like this : <input type ="hidden" name = "name" value="">. 
  6. Preventing the  creation of a Session in a Jsp Page
    In jsp the session is by default true, if we don't declare a session =  "true" inside the directive, then the session is still available as it is by default true. 
  7. JSP: View Session
    The view consists of the Html page or the jsp components that provide the user interface. View is what we see. It is mainly for presentation.
  8. Duplicated Session Variables
     We don't have any need to create a new session variable because it has been created by the JSP container for you.  
  9. JSP Session Counter Using HttpSessionListener
    Counter is a device which stores the number of times a particular event or process has occurred.
    To make a program on session counter we are making use of the HttpSessionListener interface.This listener is a part of HttpSession for the HttpSession object.
  10. Using Bean Scope Session
    session scope: In this the bean will get stored in the HttpSession object associated with the current request.
  11. Setting and Getting Data in jsp through the Session
    In this example you will learn how to make Form with the help of html in jsp. By this example you can easily learn how we can get data from one page to another page. You can retrieve data from one page to another page only when the session is true .
  12. Use Of Form Bean In JSP
    This section gives you the best illustration about the procedure of handling sessions by using Java Bean.

Back to JSP Examples.



Posted on: December 14, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Session In JSP  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
sandeep kumar
June 9, 2011
maintaining session

good afternoon sir/ma'am my name is sandeep kumar and would like to maintain session in my prject and i have to use jsp code so i need that how i can imaintain session plz help me front end-jsp back end-sql thank you
June 19, 2012

yo says no and its mo
March 23, 2013
session create and validate in jsp

please tell me the demo to create session and check to if it null or not i tried many example but not work