File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet" Watch "Servlet" New topic


H Kwan

Joined: Feb 26, 2005
Posts: 1
Can anyone show me how to use servlet to read a specific website's content and then get a specific value I want to my program? Say, for example, I want to read the homepage and retrieve today's weather value.

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

I think if you double check the Met Office's website (where the BBC's weather data comes from) you'll dicover the legal reason why you can't do this. At least without paying the Met Office (presuming you want to republish their content).
[ April 25, 2005: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Do a Google search with the keywords "screen scraping".
Some sites may offer weather information as a webservice.
Also Google with the term "RSS".

None of these technologies or techniques are specific to servlets.
Servlets are a Server Side technology for you to publish your own application or content.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Servlet
It's not a secret anymore!