import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class HelloJDBC extends HttpServlet {
boolean exceptionRaised;
String exceptionMsg;
public void init() throws ServletException
{
exceptionRaised = false;
exceptionMsg = "";
try
{
Class.forName("com.mysql.jdbc.Driver");
}
catch( ClassNotFoundException e )
{
exceptionRaised = true;
exceptionMsg = "Cannot load MySQL driver: " + e.getMessage();
}
}
/**
* Create a form
*/
String createForm()
{
String form="";
String method = "method=post";
String action = "action=HelloJDBC";
String e1 = "Product ID:
";
// String e2 = "Description:
";
String e3 = "Price:
";
String e4 = "
";
form += "