Feedback Sample

This sample allows visitors at your web site to enter their names and comments. It adds each entry to a database and then displays all the entries as a log. The log has an index at the top with a hot link to each entry.

This sample requires a database to store the visitor comments. The database does not need any set-up. Refer to Configuration .

Run this sample


How this sample works:

This sample has:

  • An input form to enter data
  • A Java servlet that reads the input data, stores it in a bean, and calls the output page
  • A JavaBean that updates the database
  • A JavaServer Page (JSP) that formats the entries as a log
  • A servlet file that provides information about the servlet to the WebSphere Application Server

This sample uses a relational database to store the visitors names, and comments. It was created with the Studio Database wizard using the 'select and update' option.


How to use this sample on your web page:

You can adapt this sample to create a guestbook, gather feedback, or create a log other data that you want to collect. If you want to put this sample on your own web site, use the same table name in your database and then the only place you will have to change the database information is in the the .servlet file.