• Post Reply Bookmark Topic Watch Topic
  • New Topic

url not opening through URL Object  RSS feed

 
Rajesh Jha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to open a url : "http://www.legislature.state.oh.us/acts.cfm?GenAssem=122" through the URL Object using the following code :



But I fail to get the entire text on the page, getting only a small portion of the text.

Can any one help me out.

Thanks
 
Jiafan Zhou
Ranch Hand
Posts: 193
Fedora Linux Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are trying to open the URL "http://www.legislature.state.oh.us/acts.cfm?GenAssem=122"

Why you declare the URL use the 192.168.0.1 Ip Address, do you think that make sense?


Kind regards,
Jiafan
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say you have a problem reading in data but you fail to show us the code where you are actually doing the reading. We can't read your mind. Show us that code too.
 
Rajesh Jha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jiafan, but the code :



definitely makes a lot of sense. I've used one of the constructors, available. Please take a look at this Page " http://java.sun.com/j2se/1.4.2/docs/api/java/net/URL.html

Can ane one please tell me if there are other Objects available in Java for Opening a particular URL. Like WebBrowser or IE etc.

Joe, once you have it in a BufferedReader object you can read it in any manner you like. Eg. by using readline().

Here's the code :


Now, can you provide any help.
 
Jiafan Zhou
Ranch Hand
Posts: 193
Fedora Linux Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should paste more code for us to analyse for ye.

Regards,
Jiafan
 
Rajesh Jha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jiafan

The code is working now, Actually the Proxy settings I used in Creating URL object was wrong. I corrected it.

Thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!