Faulty Service in Apache Tomcat WebService
问题 I am getting faulty services in my apache tomcat web service after adding this method in the web service: public String getAllEvent() { JSONArray jsonArray = new JSONArray(); try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/mydb", "root", "root"); PreparedStatement statement = con .prepareStatement("SELECT * FROM event"); ResultSet result = statement.executeQuery(); while (result.next()) { JSONObject eventInfo = new JSONObject