HttpURLConnection how to connect url
hi all
in first I'm using jsp
and need connect into jsp the url without redirect the jsp
in simple need take httprequest without redirect
URL url=new URL("the url need send request");
HttpURLConnection hcon(HttpURLConnection)url.openConnection();
hcon.setRequestMethod("GET");
hcon.setInstanceFollowRedirects(true);
hcon.connect();
but the code not work
please help me as soon as possible
regards

