Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.net.ProtocolException

 
Varun Jain
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to fetch some data from website using java code and I am getting this exception.
Any idea how to rectify it?
I have tried System.setProperty(max.Redirects...) but this does not work...

java.net.ProtocolException: Server redirected too many times (20)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:803)
at Hello.addCorporate(Hello.java:607)
at Hello.main(Hello.java:96)
 
Ankit Tripathi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What can be a solution for that.I am also facing same problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic