Primary interface to DB2.
DB2 and Beans
It handles both GET and POST method, and its
action is determined by a parameter called
Performs search to the Redbooks database.
The search argument is stored in a parameter
List 10 latest book of a category. The category
is indicated by its first argument.
Provide 10 latest published book from all
category in the Redbooks database.
Access the abstract of a redbook and display it
3.5.2 Maintaining state in HTTP
HTTP is a stateless protocol. To perform transactional activities, some kind of
state must be maintained. There are many ways of maintaining state that has
been developed: Using cookies, URL re writing, hidden form fields in the
HTML form, and so on. The Java servlet API implements access to state via
the HttpSession object.
126.96.36.199 Session Tracking
HttpSession is a technological implementation that is used to manage
sessions on the stateless HTTP protocol. It is part of the Java Servlet API,
and it is accessible in the Java Servlet development kit.
The HttpSession object is the Java programing object that has a
dictionary like interface to store user defined data. Data can be stored in the
HttpSession object with any keyword, and the data is then retrieved with that
Each of the session objects has its own ID. HttpSessions objects are related
to the client using its session ID. The session tracker uses the session ID to
find the user's session object. The session object is not sent between the
Web client and the server. Only the ID is passed back and forth between the
Web client and the Web server. This means that the session object is suitable
to store the user's secure data.
Since there are many different ways to represent a session data, the
HttpSession provides a seamless, uniform way to access session data. It
Chapter 3. Building the Web server