Tomcat and proxy settings

前端 未结 6 1363
北海茫月
北海茫月 2021-01-04 10:40

There is a servlet running on tomcat7 and it makes a webservice call to a third party website. The call works fine from the windows machine but when run from tomcat it fails

6条回答
  •  时光说笑
    2021-01-04 11:06

    You can use jProxyLoader library. Using this lib you can configure Tomcat to use proxy only for connections to specific host. In your case you can configure Tomcat to go via proxy only for connections to host serving the webservice (all the other connections will be handled by Tomcat "normal" way - without proxy).

    Complete setup is explained on project website: http://jproxyloader.sourceforge.net/examples/web-application-on-tomcat.html

提交回复
热议问题