I *believe*, but don't hold me to it, that you can implement a filter
AFTER the JSP renders, in the latest servlet spec.  With that, you
shouldn't have much trouble taking the output stream and sending it as an
eMail.  I'd also assume, although I don't know for sure, that you could
basically "kill" the response at that point, so it's not trying to send
back to the client or anything.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, December 16, 2004 1:38 pm, haimra said:
> I had tried doing the same thing and failed.
> But after I gained more knowledge I had a new idea that I did not tried
> yet.
> I will be happy if you let me know if it works.
>
> The basic Idea is that if we used a servelet we had no problem taking the
> StringBuffer created and coping it into the mail message and not back to
> the
> browser.
>
>
> The problem with JSP, it's actually a servlet but we can not control it.
> In the Java Server Page (O'reilly page 315) book I found some directive
> element.
>
> <%@ page buffer="12kb" autoFlash="false" %>
>
> When autoFlash="false" the JSP container will not flush the buffer until
> the
> following script <% out.flash() %> is used. Maybe there is a way to
> redirect
> this output writer to a buffer and email it.
>
> What do you think?
> Haim
>
> -----Original Message-----
> From: Gabriel Belingueres [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 15, 2004 12:15 AM
> To: [EMAIL PROTECTED]
> Subject: sending a JSP page by email
>
> Hi,
>
> How can I take advantage of Tomcat's JSP processing engine to use a
> JSP page as a template for an email?
>
> That is, I want to do something like a page forwarding from a servlet,
> but this forwarding process the JSP page and, instead of send it to
> the browser, it send it by email to somebody.
>
> Thanks in advance,
> Gabriel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to