The source code of PantoOra.java: import java.io.* ; import javax.servlet.* ; import javax.servlet.http.* ; import java.sql.* ; // for JDBC public class PantoOra extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { doGet(request,response) ; } public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html") ; PrintWriter out = response.getWriter() ; Furniture.doHeader(out, "List of Pantomimes") ; out.println("This servlet contacts the Oracle instance" +" \"CS\" and extracts a list of pantomimes" +" performed in Stirling.<p>") ; try { String driver = "oracle.jdbc.driver.OracleDriver"; Class.forName(driver) ; // out.println("Driver loaded.. <br>") ; } catch(Exception e) { out.println("Failed to load driver "+ e.getMessage()) ; Furniture.doFooter(out) ; return; } Connection con = null; try { String url = "jdbc:oracle:thin:www/wwwish" // Note: www/wwwish is a public username/password + "@oracle.cs.stir.ac.uk:1521:cs" ; con = DriverManager.getConnection(url) ; } catch(SQLException e) { out.println("SQLException: " + e.getMessage()) ; Furniture.doFooter(out) ; return; } // out.println("Got connection...<br>"); try { Statement stmt = con.createStatement(); String query = "SELECT DISTINCT Season, Title FROM sbj.Panto" ; // Note: sbj.Panto has SELECT GRANTed to www out.println("The query is:<br><tt>" + query + "</tt><p>") ; ResultSet rs = stmt.executeQuery(query); int nrows = 0 ; while (rs.next()) { nrows++ ; String year = rs.getString(1) ; String panto = rs.getString(2) ; out.println("In " + year + " the panto was " + panto + "<br>") ; } out.println("<br>(" + nrows + " pantomimes listed)<br>") ; stmt.close() ; } catch(SQLException e) { out.println("SQLException: " + e.getMessage()) ; } try { con.close() ; } catch(SQLException e) { out.println("SQLException: " + e.getMessage()) ; } Furniture.doFooter(out) ; } // doGet } // class