if(!connection.isClosed())
out.println("Successfully connected to " + connectionURL + " MySQL server using TCP/IP");
connection.close();
if(!connection.isClosed())
out.println("Successfully connected to " + connectionURL + " MySQL server using TCP/IP");
connection.close();