1
안전한 웹 페이지 데이터를 읽고 싶습니다. https://www.paypal.com이라고 말하면 프록시를 사용하고 있습니다. 나는 시도했다.프록시 웹 뒤에 https 웹 페이지 데이터 읽기
System.setProperty("java.net.useSystemProxies","true");
System.setProperty("htttps.proxyHost","myproxyhost");
System.setProperty("https.proxyPort","443");
URL u = new URL("https://www.paypal.com");
URLConnection uc = u.openConnection();
uc.setDoOutput(true);
StringBuffer sbuf=new StringBuffer();
BufferedReader in = new BufferedReader(
new InputStreamReader(uc.getInputStream()));
String res = in.readLine();
System.out.println(" Response from paypal "+res);
while ((res = in.readLine()) != null){
sbuf.append(res).append(",");
}
in.close();
System.out.println(" Total Data received "+sbuf);
항상 UnknownHostException을 받고 있는데, http 웹 사이트에서 데이터를 성공적으로 가져오고있다. 내가 놓친 게 있니?
덕분에, Rohit
잡기. ___ –