Accessing DB2 via JDBC on page 83, and given example code in Figure
67 on page 87.
At each invocation, via a POST method, it must then implement the action
required. We will discuss the implementation of these actions in further
detail in this section.
The DB2 servlet AccessUserstuf must act on POST methods. Hence, it is
implemented as an HttpServlet. Each action can either succeed or fail. The
page to redirect to, in either case, is passed as parameters in the Request
object with the name of success and failure.
A brief discussion of the actions implemented in the AccessUserstuf servlet
are as follows:
This action requires a valid username and password in Request object. It
then put s the username, password, user information, and user profile in
the HttpSession object
This action requires a valid username and password in the HttpSession
object and a new password (password1) with its validation (password2) in
the Request object. It checks whether password1 is equals to password2
and updates the userverify table and the password value in the
This action requires a non existing valid username, a non blank password,
valid userinfo, and userprofile in the Request object. It then performs the
Inserts the new username and password into userverify table
Inserts the new userinfo into userinfo table
Inserts new userprofile into userprofile tables
Puts the username, password, userinfo, and userprofile in the
It requires a valid username, password in HttpSession object, and a valid
userinfo and userprofile in Request object. It then updates userinfo table
and userprofile table and the Session object.
Linux Web Hosting with WebSphere, DB2, and Domino