JavaServlet代理
如果我将系统设置为在servlet的doPost方法中使用代理,那么该方法中的所有输出连接都会通过代理吗?例如:JavaServlet代理,java,servlets,proxy,Java,Servlets,Proxy,如果我将系统设置为在servlet的doPost方法中使用代理,那么该方法中的所有输出连接都会通过代理吗?例如: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.setProperty("http.proxyHost", "myProxyServer.com")
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.
}
基本上,是的。你有问题吗?@kolossus这只是一个理论问题,但是如果我使用一个api建立连接,它仍然会通过代理,因为代理是在系统级别上的?