|
-
August 5th, 1999, 06:11 AM
#1
URLConnection not working
Please see the following code & help me :
URL hp = new URL ("http://www.starwave.com/people/naughton/");
URLConnection hpCon = hp.openConnection ( );
int len = hpCon.getContentlength ( );
if (len > 0) {
System.out.println("Content-length: + len);
}
else {
System.out.print("No Content Available");
}
I am getting
"No Content Available"
Can somebody tell me what is the reason for this message ??
Zulfi.
-
August 5th, 1999, 08:33 AM
#2
Re: URLConnection not working
There may be one of the two reasons...
1. the url u r trying is redirecting
2. The server may be sending data in chunks. I don't know if the URLConnection class retrieves contents if sent in chunks.
- UnicMan
http://members.tripod.com/unicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|