Sunday, September 7, 2014
Session
* Because http is stateless protocol.It mean that,it don't save state of user.For example,when you surf a shopping web and you don't want to enter your information for each buy.Therefore session was born to maintain that information in servlet.
- There are five ways to manipulate with session.
+ Url writing.
+ Hidden form variable.
+ Persitent cookies.
+ Persiten mechanism.
+ Servlet APIs
- The following is a example about session.
- This is index page.This page is used to enter information of user .After that this information is sent to LoginServlet for processing.
-This is LoginServlet page.This page is used to receive information that is send by client(userName).After that ,this username is saved into session.
- This page is used to display information saved in session username.
Subscribe to:
Post Comments (Atom)



No comments:
Post a Comment