InfoCenter Home >
4: Developing applications >
4.4: Personalizing applications >
4.4.2: Keeping user profiles >
4.4.2.2: Customizing the base user profile support >
4.4.2.2.2: Adding columns to the base user profile implementation
4.4.2.2.2: Adding columns to the base user profile implementation
The base implementation of the user profile is contained in the class:
com.ibm.servlet.personalization.userprofile.UserProfile
It contains the columns discussed in section 4.4.2.1. The
application developer can add columns to the base implementation,
but cannot delete columns from it.
Adding columns is a two-step process, as follows:
- Extend the UserProfile class.
- Modify your existing servlets to use the new columns.
Several examples are available to demonstrate how to extend the
base user profile implementation and utilize the extension with a
servlet.
Example |
Description |
UPServletExample.java |
Demonstrates how a servlet opens a user profile and prints the fields contained within it |
UserProfileExtendedSample.java |
Shows how to extend the UserProfile class to add a column to the user profile for
a cellular phone number.
The WebSphere administrator needs to configure the User Profile Manager to point to
the extended class. |
UPServletExampleExtended.java |
Shows how to modify the UPServletExample servlet
to include the cellular phone number in the output |
UserProfileExtended.java |
Shows how to extend a hash table to place arbitrary
name/value pairs into the user profile |
UPServletExtended.java |
Shows how to extend the servlet. When any of the newly added columns
are removed or replaced, look for the table
named "USERPROFILE" in the database to which the user profile is configured and
drop that table. |
The examples are encoded in HTML for viewing in a browser.
The documentation directory also contains non-HTML versions (.java
files) that are ready for use.
|
|