Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- String driveName = "com.mysql.jdbc.Driver";
- Class.forName(driveName).newInstance();
- } catch(java.lang.ClassNotFoundException e) {
- System.err.print("ClassNotFoundException: ");
- System.err.println(e.getMessage());
- }
- try{
- con = DriverManager.getConnection("jdbc:mysql://localhost:3306/onlinequiz","root","root");
- Statement statement =con.createStatement();
- // int id=Integer.parseInt(request.getParameter("T1"));
- int quizID = Integer.parseInt(request.getParameter("quizID"));
- %>
- <%
- statement.close();
- } catch ( Exception e ) {
- out.println( "Exception: " + e.getMessage() );
- }
- // execute the statements even if the exception occurs
- finally{
- }
- %>
Add Comment
Please, Sign In to add comment