Emailing JSP generated HTML

I've written a JSP page that gets an object returned to it after making some calls and formats the contents of the object as HTML and output this to a browser. Now I need to also be able to email this webpage. While I can of course rewrite this as a java class appending each line of HTML to a StringBuffer and then sending the resultant string either in an e-mail or out to the now smaller jsp, having to print tags really defeats the purpose of having JSP in the first place. Could some please suggest a sane'er solution?

[532 byte] By [levshow20a] at [2007-11-26 14:45:17]
# 1
You can use a filter to intercept the response, send an emial and then return the response to the client.
tolmanka at 2007-7-8 8:32:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks, but there is somethign else I forgot to mention that this may also need to be cronned, and I cannot CANNOT use wget or anything of such sort because the site is protected by siteminder :(
levshow20a at 2007-7-8 8:32:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Better than a filter that intercepts would be to use a javax.activation.URLDatasource for your email.

That will call the JSP on your server, and send the response text as the email.

You mentioned Siteminder. Would that stop you requesting the URL?

In that case you might just use a different templating technology, and duplicate the work.No its not nice. Maybe you can configure siteminder to allow requests from your email job/process?

evnafetsa at 2007-7-8 8:32:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Yeah looks like I wont be able to avoid the latter. Thanks for all the help.Message was edited by: levshow20
levshow20a at 2007-7-8 8:32:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...