Validating a URL

I have a rich text field that contains URL hotspots. I want to use the two new LotusScript classes of NotesRichTextNavigator and NotesRichTextDocLink to construct a list of the URLs found in these hotspots in the rich text body field. After I construct this list I want to automatically validate the URLs to ensure that the links exist and work. I was recently told that this functionality exists in Java classes that I could use in an agent. I could not find this. Does anyone know how this could be done?

Thanks

Rob

Subject: Re: You could in ASP.net

http://authors.aspalliance.com/damianm/article/9/----------------------------------

Here is a solution to your problem, an automated link checking routine.

Source Code

Check.aspx The URL entry form and result page

Check.aspx.vb Code behind to check the URL

In the above code you will see that it uses 4 ways to identify problem URLs.

Check the URL for errors, e.g.: invalid address or 404 page not found.

Check the URL is not Redirected either server side or client side, indicating the site has moved

These next 2 require some prior knowledge of the site

Check the Title has not change, indicating the site is not what it used to be

Check the page has not changed, this only works for static pages

Examples

Subject: Validating a URL

A NotesRichTextDocLink object represents a Notes link, not a URL link. You can use a NotesDXLExporter and a NotesDOMParser to model the document. Then GetElementsByTagName(“urllink”) gets the URL links.Once you have a link, you can try using URLOpen to open it. If it opens, you still do not really know that it is valid. The web page might say, “This web site no longer exists”, or it might be an ISP’s placeholder for a parked domain. If the web page does not open, you still do not really know that the link is not valid. The server might be down temporarily. Things like this make it difficult to validate URLs automatically.