Guestbook Servlet with a SQL-Database Connection

The purpose of this assignment was to:

Learn how to use a HTML form that connects to a servlet that connects to a database.

The description and my solution of the Guestbook Servlet - assignment can be viewed and/or downloaded at the bottom of this page.

About having a SQL-Database Connection

Having a SQL-database connection to a website is a very common and useful technique for allowing client interaction. Shopping carts, blogs or forums all use databases to store information retreived from clients, and many of them use SQL-databases.

Assignment Description

Create a simple guestbook. Visitors should be able to write:

Here it's important to avoid SQL-injection and not allowing HTML code.

My Solution, Assignment Files

Since I currently haven't got a SQL-database set up for this guestbook servlet you can't try the guestbook here. You can, however, download and use the code by simply changing the values of the database username and password to fit your needs.

You will need the Mixer class in your classpath to try the Guestbook Servlet. Licence: GNU GPL .

«  Previous Next  »