views:

57

answers:

1
+1  A: 

JSP is not the thing to do here. Have a separate process that fills out a Velocity template (for email) or generates a PDF using XSL-FO or iText and leave JSP out of it. It's a completely separate use case from sending back an HTTP response.

duffymo
I can't see why this is so difficaled....all the magnesium's is there to merge data with HTML content in the... see edited post
nico
@nico, it's difficult because the server has committed the response to the client for the original request; once the response has been committed, you cannot write another response or modify the original. You cannot alter that behavior of the server - that's how the internet works.
Vineet Reynolds
(+1) for the Velocity suggestion.
StudiousJoseph
I'm not trying to alter the server (Tomcat), all I need is to re-use the BIG-BIG set of code to merge data and text (html in this case), dynamical. It's there, why reinvent the wheel. I don't want to manipulate the response to the browser at all... if I can clone the HttpServletResponse and disconnected it from the reply it will also work.
nico