• 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

HTML Source

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to get the HTML View Source of a page..say Google.com

How can I get this using JAVA?

Thanks.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, welcome to the Ranch!

You'll probably wind up using HttpURLConnection. The Sun Custom Networking Tutorial will get you there pretty quickly.

I don't know if you've been hanging around the ranch long enough to pick up the style here. We try not to give code answers to questions, but just enough hints to get you going. It's a lot more fun and sticks in your brain better if you work it out yourself. So give the tutorial a try, then see if you can put together some code. If you get stuck just show us what you have so far.

Enjoy!
reply
    Bookmark Topic Watch Topic
  • New Topic