Register / Login
This week's giveaway is in the
We're giving away four copies of
Java EE 8 High Performance
and have Romain Manni-Bucau on-line!
(the Servlet logic works), but with the URL attempt below, I'm not getting it to POST.
No errors in the
Here's the basic logic (from a basic
// call a
service to get an XML
String xmlData = ws.getData() // ws is connection to the web service.
// now, the part that doesn't seem to connect to the Servlet...
url = new URL ("myServletURL"); // actual http address would be inside the quotes
URLConnection connection = url.openConnection();
OutputStreamWriter out = new OutputStreamWriter(
out.write("data=" + xmlData);
The servlet is supposed to create a disk file given this XML string, but the URL connection doesn't appear to work as no disk file gets created.
The same logic in .NET (using their URL equivalent logic) works fine.
Any ideas what I'm missing?
Thanks in advance!!!
posted 7 years ago
Please do not post the same question multiple times. Let's continue the discussion in this
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
Occasional Connection Reset (IO Exception) Errors when POSTing to Servlet
DELETE http request in HttpURLConnection....
javax.net.ssl.SSLException: untrusted server cert chain
need help on Java.NIO
Writing text files on a webserver