Re: Generate Website(HTML) thumbnails on the fly
On Mar 27, 11:02 pm, "aussie" <aussiestac...@yahoo.com> wrote:
Our team needs to have a on the fly website thumbnail. ..
..Preferably I would
like to set up a servlet that can take url as a parameter and return a
thumbnail image ..
<http://schmidt.devlib.org/java/save-jpeg-thumbnail.html>
..of that website.
Uh-huh. So you need to *render* the web-site
first? Even to get an image?
There are a variety of ways you might go about
that, including using web start services to open
the web page in the defualt browser, and the
Robot to get a snapshot of it. I don't know
how well they could be implemented in a servlet,
though.
I don't think it is practical (read possible)
to use web start from servlets, so maybe
BrowserLauncher2 might do it, but then
there is the problem of getting a browser in
what might be a 'headless' environment.
..The only lead I have found on the web
was to use JEditorPane(URL)
Unfortunately JEditorPane is not suited to
rendering 'real world' web pages. Are all the
sites of interest to the end user, controlled
by you? If so, it might be possible to make
a version of the site(s) that is 'JEP compatible',
but that sounds likle more work than it is worth.
Andrew T.