Have you considered using the jakarta commons httpclient library to send a 
separate request from your test framework back to the JSF page on the same 
server (or a different one)?

The HttpClient operation will then return the complete block of HTML rendered 
by that JSF page without any complex interactions with the current 
request/response objects.

Regards,

Simon

---- Alexander Lendl <[EMAIL PROTECTED]> schrieb:
> 
> Hi,
> 
> I need to include the rendered html output from a myfaces jsf page in an old
> jsp page (not a jsf page!). Unfortunately it's not possible to use a jsf
> page at this point. It's a jsp/servlet framework application which is used 
> during developement to test the output of portlets in tomcat - custom jsp
> tags include the rendered portlet output into a template jsp containing
> "grids" (divs). 
> 
> Now we want do change the portlet development to JSF (myfaces), but it's
> still required to use that test framework. For jsf portlets we will use the
> "MyFacesGeneralPortlet".
> 
> My first attempt was to use a jsp include, but it didn't work.
> 
> <jsp:inlcude page="jsf/test.jsf"/> results in a
> java.lang.IllegalStateException: Cannot forward after response has been
> commited
> 
> What I need is an include  and not a forward. Is it possible to store the
> rendered jsf ouput  in a PhaseListener (RENDER_RESPONSE phase) in the http
> request and then include it with a jsp custom tag in the page?
> Is this the right approach? How do I get the rendered html output (as
> String?) from the FacesContext?
> 
> Thanks in advance!
> Alex
> -- 
> View this message in context: 
> http://www.nabble.com/include-rendered-JSF-output-in-JSP-page-tf4434536.html#a12651358
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 

Reply via email to