Session In JSP
- HTTP Protocol
HTTP Protocol stands for Hyper Text Transfer Protocol. It is the protocol used to convey information of World Wide Web (WWW).
- 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.
- 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.
- JSP URL
Rewriting
URLRewriting can be used in place where we don't want to use cookies. It is used to maintain the session.
- 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="">.
- 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.
- 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.
- 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.
- 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.
- Using Bean
Scope Session
session scope: In this the bean will get stored in the HttpSession object associated with the current request.
- 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 .
- Use Of
Form Bean In JSP
This section gives you the best illustration about the procedure of handling sessions by using Java Bean.