wood burning stoves 2.0*
The moose likes Servlets and the fly likes information retrieval from JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "information retrieval from JSPs" Watch "information retrieval from JSPs" New topic
Author

information retrieval from JSPs

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi!
I need to get hyperlinks from html documents through JSPs located in external web servers, in order to monitor modifications in web content.
From static html it's easy, but i'm a little confused when it envolves server pages located in servers that i do not have unlimited access.
regards,
Alexandre Bairos

Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Alexandre Bairos:
Hi!
I need to get hyperlinks from html documents through JSPs located in external web servers, in order to monitor modifications in web content.

If I understand you correctly, all you want to do is fire a HTTP GET request at those servers, and scan the HTML returned for hyperlinks. Right? Look into java.net.URL.getContent() for your requests. To extract the URLs, a simple string scan (java.lang.String.indexOf()) might be adequate.
This will work irrespective of the type of source (flat HTML, JSP, ASP, PHP, whatever). But, database-driven web pages are virtually impossible to check thoroughly. If the links you want to scan may come from the database, you're stuck.
- Peter
 
GeeCON Prague 2014
 
subject: information retrieval from JSPs