• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

url not opening through URL Object

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 193
Mac OS X Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac OS X Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic