It's not a secret anymore!*
The moose likes Servlets and the fly likes Read a Web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Read a Web page" Watch "Read a Web page" New topic

Read a Web page

Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

Hi all,
I ll be glad if any one could help me with the following.
Here is what I want to do.

I read an RSS feed of any site, and for a specific link returned in by RSS Feed, I want to read that page and embed/include it to my page rather than going to the original site.

Can I use Dispatchers or HttpConnection for this purpose.
Optionally I also want to remove un-necessary contents from the included page.

I tried following but did not work

RSS Feed :

One of the links returned by above Feed is :

I also tried the dispatcher include passing the URL, but no luck.

Thanks in advance

K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Aren't RSS feeds essentially just XML files? If so, you could easily open a socket connection to the remote server and parse it (e.g. JDOM) and extract the link. I do this with the Slashdot RSS feed.
Aryan Khan
Ranch Hand

Joined: Sep 12, 2004
Posts: 290

Thanks for the reply Kashif,

Can you please post some sample code for how you read it.
Basically What I am looking is like web page, which read news from CNN, but shows it within their own site.
I agree. Here's the link:
subject: Read a Web page
Similar Threads
Reading hyperlink in excel through Java
Bug on RSS Feed
Java Website post
Connect to ASP app via JSP and display output?
Students Stung As Computer Schools Shut