dev@javaserverfaces.java.net

Re: Servlet dependency in Mojarra RenderResponsePhase.execute() method

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Tue, 19 Jan 2010 14:47:06 -0800

>>>>> On Tue, 19 Jan 2010 17:15:23 -0500, Neil Griffin <neil.griffin_at_portletfaces.org> said:

NG> As you know I'm writing a JSF 2.0 Portlet Bridge for Micha that will
NG> go in to open source when I'm done. When I got to trying the f:ajax
NG> stuff, I ran into a ClassCastException. The problem starts here in
NG> RenderResponsePhase.execute():

NG> if (partialViewContext.isPartialRequest()) {
NG> OnOffResponseWrapper onOffResponse = new OnOffResponseWrapper(facesContext);
NG> onOffResponse.setEnabled(false);
NG> }

NG> You see, the OnOffResponseWrapper extends HttpServletResponseWrapper
NG> which is causing Mojarra to throw a ClassCastException in
NG> OnOffResponseWrapper.java, because the response is not an
NG> HttpServletResponse, but an impl of the
NG> javax.portlet.PortletResponse.

NG> Do you have a recommendation as to the best way to remove this
NG> servlet dependency in Mojarra, so that it will work in a portlet
NG> environment too?

Adding mojarra dev. Putting Neil on Cc.

I've looked into this and I can't see how this OnOffResponseWrapper
actually is installed. There are only two usages. The one you site,
and in PartialViewContext.processPartial().

Can someone please tell me if we actually need OnOffResponseWrapper? It
doesn't even seem to be installed anywhere.

Thanks,

Ed

-- 
| ed.burns_at_sun.com  | office: 408 884 9519 OR x31640
| homepage:         | http://ridingthecrest.com/