Java Servlet代理

时间:2014-06-04 00:16:36

标签: java servlets proxy

如果我将系统设置为在servlet的doPost方法中使用代理,那么方法中的所有连接都将通过代理吗?例如:

    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {

System.setProperty("http.proxyHost", "myProxyServer.com");
System.setProperty("http.proxyPort", "80"); 


CONNECTING TO A THIRD PARTY HERE.

}

0 个答案:

没有答案