I'm attempting to make a java program which will access a certain webpage, but it's an asp page and I'm not sure how to do this. I can do it for .html pages, but when I enter in an asp one it gives me these errors:
java.net.ProtocolException: Server redirected too many times (5)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at WebClient.main(WebClient.java:33)
Exception in thread "main"
So obviously I need to use another method of accessing the URL than I am now, which is just using the URLConnection class. I have looked around the net and couldn't find anything to help me.
And by the way this isn't for school. 😛
java.net.ProtocolException: Server redirected too many times (5)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at WebClient.main(WebClient.java:33)
Exception in thread "main"
So obviously I need to use another method of accessing the URL than I am now, which is just using the URLConnection class. I have looked around the net and couldn't find anything to help me.
And by the way this isn't for school. 😛