tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gb1071nx" <gb107...@globallyboundless.com>
Subject RE: Avoiding same server to server HTTP calls to generate HTML pages via JSPs
Date Fri, 04 Jan 2008 03:44:26 GMT

> Both incorporate the output of jsps and servlets in 
> the current request's output. 

Which is not what the OP wanted.  They wanted to :

> > essentially slap that [the response] into a MimeBodyPart for sending

> > text/html email messages.
> >

I've done something very similar - use an HTTP connection to 'scrape' a
page, and then include that output as the contents of a rich email.
The only thing I've done to make it easier is bundle up that
functionality in my own Util class that has a "scrape" method that takes
the current request, an URL and returns a String. 
 
I use it when I want to scrape JSPs for their content. 

In some cases, I have a few simpler "pages" that are actually velocity
templates. Velocity can be used outside the context of a HTTP
request/response cycle, so if you're able to re-do your JSP pages as
velocity templates (or similar technology) then it could be your best
bet.  http://velocity.apache.org 



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message