User manual

private String pin;
//string to contact SCU server9 with login and password
String url = "jdbc:oracle:thin:@server9.engr.scu.edu:1521:dc81";
String login ="wle";
String passwd = "wle";
/**
* This method initialize servlet.
* @param config The ServletConfig value to be initialized
* @exception ServletException on servlet error
* @see ServletException
*/
public void init(ServletConfig config) throws ServletException
{
super.init(config); //pass servletConfig to parent
}
/**
* This method gets data from database.
* Displays as an HTML file.
* @param req HttpServletRequest
* @param resp HttpServletResponse
* @exception ServletException on servlet error
* @see ServletException
* @exception IOException on input and output error
* @see IOException
*/
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
Connection conn = null;
Statement stat = null;
ResultSet rs = null;
StringBuffer sbuf = new StringBuffer();
// return HTML
resp.setContentType("text/html");
// get handle to output stream
PrintWriter out = resp.getWriter();
cellphonenumber = req.getParameter("cellphonenumber");
pin = req.getParameter("pin");
try {
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(url, login, passwd);
conn.setAutoCommit(true);
stat = conn.createStatement();
//SQL statement
String qs = "select * from pb,users where pb.usernum= " +
cellphonenumber +" and users.num= " + cellphonenumber + " and users.pin
= " + pin +" order by pb.contactname";
out.println("<HTML>");
out.println("<HEAD>");
//start A-Z links
out.println("<script>");
out.println("function init()");
out.println(" {");
48