Re: [Htmlparser-user] (no subject)
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2004-03-31 23:15:43
|
Roger, The HTML parser is ideal for your application. The URL can be passed to the Parser constructor and a rewriting URL example is provided in the org.htmlparser.parserapplications.SiteCapturer class. Sending the modified page is accomplished by formulating the servlet response from the string returned from the toHtml() call rather than writing to a file. It shouldn't take more than a couple of hours before you can deploy it. Derrick Varley, Roger wrote: >Hi Everyone > >I've just come across HTMLParser and I would like to know if it can help me with my particular case and how I go about using it. > >I am writing a servlet that receives as a parameter a url to another site. The servlet needs to construct a request to this URL and retrieve the HTML data. I need to parse the retrieved data and re-write any URL's that it contains before passing the amended HTML page back to the original client. > >I'd be grateful for pointers to any sample code. > >Regards >Roger > > > > |