Procédure
- Arrêtez votre serveur Tomcat.
- Allez dans <TomcatPath>\bin et modifiez le fichier setenv.bat. Si le fichier n'existe pas, créez-le.
-
Ajoutez les lignes suivantes au fichier setenv.bat. Modifiez les paramètres afin de les faire correspondre à votre configuration :
[Tomcat Proxy Property] -Dhttp.proxySet=true -Dhttp.proxyHost=proxy.server.com # Specify the host name or IP address of your HTTP proxy server. If your proxy uses an HTTPS host name, use Dhttp.proxyHost=https. -Dhttp.proxyPort=YourHttpProxyPort # Specify the port number of your proxy server. -Dhttp.nonProxyHost='localhost|host.mydomain.com|192.168.0' # Specify a list of hosts separated by "|" that do not require access through your proxy server. -DsocksProxyHost=YourSocksProxyHost # Specify the host name or IP address of your SOCKS proxy server. -DsocksProxyPort=YourSocksProxyPort # Specify the port number of your SOCKS proxy server.
Remarque : Vous pouvez également ajouter ces paramètres au fichier catalina.bat. Par exemple :SET JAVA_OPTS=%JAVA_OPTS% -Dhttp.proxyHost=http://proxy.server.com -Dhttp.proxyPort=3128
Pour plus d'informations concernant la configuration du proxy, consultez https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html. - Redémarrez votre serveur Tomcat.