Just to expand on Andrew's comment...
In your listener add this piece of code:
ExtensionsResponseWrapper extRespWrapper =
(org.apache.myfaces.webapp.filter.ExtensionsResponseWrapper)
FacesContext.getCurrentInstance()
.getExternalContext().getResponse();
String currentResponseHTML = new String(extRespWrapper.getBytes());
... now you can email the html
-----Original Message-----
From: Andrew Robinson [mailto:[EMAIL PROTECTED]
Sent: Monday, June 11, 2007 10:50 AM
To: MyFaces Discussion
Subject: Re: How to email a JSF page?
One idea could be to write a custom phase listener that wraps the
ResponseWriter, buffers all the output and then after the render
response phase, sends the contents in the body of an HTML email.
-Andrew
On 6/11/07, Dave <[EMAIL PROTECTED]> wrote:
> Hi, I am using JSF on JBoss. Recently I got a requirement to email a page
> to users.
>
> How to email a JSF page? When a user opens the email, s/he should see the
> whole JSF page (rendered HTML page).
>
> Basically my question is: how to generate HTML code from a JSF page on
> server side so that I email the generated HTML?
>
> Thanks for any info.
> Dave
>
> ________________________________
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
>
>