I don't know any Java, but if you want to give it a try, here's the code I used for the script.
#!/usr/bin/perl -w
use DBI;
use strict;
# Create a new Apache request object
my $r = shift;
# Set up the parameter hash
my %q = $r->method eq "GET" ? $r->args : $r->content;
my $dbh = DBI->connect("DBI:mysql:adressen", "user", "secret", {RaiseE
+rror => 1});
$r->send_http_header;
print qq(<html>
<head>
<title>Adressbuch</title>
</head>
<body bgcolor="#ffffff">
);
print qq(
<CENTER>
<H1>Mein Adressbuch</H1>
<A HREF=addnew.pl>Neuer Eintrag</A><BR><BR>
<B>Suche nach:</B><BR>
<FORM METHOD="POST">
<INPUT TYPE=text NAME=list SIZE=30>
<INPUT TYPE=submit VALUE="Suche">
</FORM>
<P>
);
for ('A' .. 'Z') {
print "<a href=\"/perl/adressen/?list=$_\">$_</a> \n";
}
print "<br><br>\n";
if ($q{"list"}) {
my $search = $q{list};
my $sth = $dbh->prepare("SELECT * FROM list WHERE nachname LIKE ?
+ORDER BY nachname");
$sth->execute("$search%");
my ($nachname, $vorname, $strasse, $plz, $ort, $telefon1, $telefon
+2, $email, $id);
$sth->bind_columns(\($nachname, $vorname, $strasse, $plz, $ort, $t
+elefon1, $telefon2, $email, $id));
if ($sth->rows > 0) {
print "<BR><BR>";
print "<H3>Gefundene Einträge:</H3>";
print "<TABLE border=0 cellpadding=5>";
print "<tr align=center><td><b>Name</b></td><td><b>Straße</b><
+/td><td><b>PLZ Ort</b></td><td><b>Telefon</b></td><td><b>eMail</b></t
+d></tr>";
while ($sth->fetch) {
print "<TR>";
print "<TD valign=top><B>$nachname $vorname</B></TD>";
print "<TD valign=top>$strasse</TD>";
print "<TD valign=top>$plz $ort</TD>";
print "<TD valign=top>$telefon1<BR>";
print "$telefon2</TD>";
print "<TD valign=top><I><A HREF=mailto:$email>$email</A><
+/I>";
print "</TD>";
print "<TD align=right valign=top><FONT SIZE=-1><A HREF=ch
+ange.pl?id=$id>Ändern</A> ";
print "<A HREF=kill.pl?id=$id>Löschen</A></FONT></TD>
+</TR>";
print "<TR><TD colspan=7><HR></TD></TR>";
}
print "</table>\n";
} else {
print "<h3>Nichts gefunden.</h3>\n";
}
}
print "</center>\n";
print qq(
</body>
</html>
);