|
dispaly content of a url using httpurlconnection
|
|
02-19-2010, 08:08 PM
Post: #1
|
|||
|
|||
|
dispaly content of a url using httpurlconnection
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("http://www.msn.com"); 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. |
|||
|
« Next Oldest | Next Newest »
|




