Thursday, October 14, 2010

JSP Session Management-I


JSP Session Management in jsp


Introduction:
                        The HTTP (Hypertext Transfer Protocol) was designed for transferring files over the World Wide Web (WWW). HTTP uses simple communication model. A client who uses browser to send request for some files, the server responds the request. For example, the client request username and the server send response the username to client. After completing the response, the communication connection is complete. And then the client request another resource, the server has no way of distinguishing it from any other client. So HTTP is called Stateless protocol.
                       
Session Tracking:

1). Hidden Form Fields.

2). URL rewriting

3). Cookies

4). HTTP session API

Example:

Letus go for understanding the use of session.

Consider three files A.jsp and B.jsp and Result.jsp

A.jsp file have one textbox to get FirstName as input and OK button.

Screen Shot below

 
B.jsp file have one textbox to get Lastname as input and OK button.

Screen Shot below



No comments:

Post a Comment