sharon3874
Programmer
I want to display the content of a url that I specified in my servlet using httpurlconnection class. I tried something like the following, but I always get a blank page, am I missing anything?
URL url = new URL("HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
urlc.setRequestMethod("GET");
urlc.connect();
I know I can use something like response.redirect, but I must use HttpURLConnection.
Thanks in advance for your help.
URL url = new URL("HttpURLConnection urlc = (HttpURLConnection)url.openConnection();
urlc.setRequestMethod("GET");
urlc.connect();
I know I can use something like response.redirect, but I must use HttpURLConnection.
Thanks in advance for your help.