Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

Cannot retrieve the Web document

Thread view: 
Sid - 02 Jul 2006 15:29 GMT
Hi,

I have been trying to write a stand-alone software for logging into
orkut. I am now trying using the URLConnection. y programme right now
is simple, it justs opens a URLConnection to the address from url and
displays the content to the terminal. I am running the program from
behind the proxy. For this i am using following code:

System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "192.168.3.254" );
System.getProperties().put( "proxyPort", "8080" );

and for https, i am using :
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

The problem is some pages open using this, but some pages like
www.orkut.com, yahoo.com, geocities.com etc. cannot be opened. I get
the get the proper date from the header but data length i am getting is
-1. I tried the same code for even forums.devshed.com and some others
like redhat.com and it works for them.

Can somebody please tell me whats wrong ? And how i can i correct it ?
Oliver Wong - 05 Jul 2006 20:35 GMT
> Hi,
>
[quoted text clipped - 20 lines]
>
> Can somebody please tell me whats wrong ? And how i can i correct it ?

   It's not clear what you mean by "some pages [...] cannot be opened."
What happens if you try to open them? Exceptions get thrown? Your computer
turns itself off? Something else?

   Content length -1 means the length is not known.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.