request.setCharacterEncoding("UTF-8");
String title = request.getParameter("title");
String data = request.getParameter("data");
System.out.println(data);
String massage = request.getParameter("massage");
Connection conn = null;
Statement stat = null;
ResultSet rs = null;
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/ranju";
String user = "root";
String password = "123";
conn = DriverManager.getConnection(url, user, password);
stat = conn.createStatement(); //这句报错
String sql = "insert into xinwen values(" + title + ",'" + data + "'," + massage + ")";
stat.executeUpdate(sql);
rs = stat.executeQuery("select * from xinwen");
------解决方案--------------------
错误信息呢?空指针还是?