Java
import java.io.*; import javax.servlet.*;
import j avax.servlet.annotation.WebServlet; import javax.servlet.http.*; import j ava.sql.*;
@WebServlet(name = "JDBCMySQLServlet", urlPatterns =
{"/JDBCMySQLServlet"})
public class JDBCMySQLServlet extends HttpServlet {
Connection connection = nuli;
Statement statement = nuli;
ResultSet rs = nuli;
ResultSetMetaData rmd = nuli;
String query = nuli;
private void createConnection(PrintWriter out) { try {
Class.forName("com.mysąl.jdbc.Driver").newlnstance() ; System.out.println("Driver Registration Successful !”);
U
JAVA Wykład 15
'vright £) 2012 Jan PROKOP
35/100