Getting “java.net.ProtocolException: Server redirected too many times” Error

后端 未结 4 2275
误落风尘
误落风尘 2020-12-08 19:20

I\'m making a simple URL request with code like this:

URL url = new URL(webpage);
URLConnection urlConnection = url.openConnection();
InputStream is = urlCon         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 19:55

    I was using Jenkins on Tomcat6 on a unix environment and got this bug. For some reason, upgrading to Java7 solved it. I'd be interested to know exactly why that fixed it.

提交回复
热议问题