Cannot write output after reading input
问题 I\'m writing a program that connects to a servlet thanks to a HttpURLConnection but I stuck while checking the url public void connect (String method) throws Exception { server = (HttpURLConnection) url.openConnection (); server.setDoInput (true); server.setDoOutput (true); server.setUseCaches (false); server.setRequestMethod (method); server.setRequestProperty (\"Content-Type\", \"application / xml\"); server.connect (); /*if (server.getResponseCode () == 200) { System.out.println (\