MyFaces 1.2: Remove Servlet dependency from JSP writebehind support -------------------------------------------------------------------
Key: MYFACES-2874 URL: https://issues.apache.org/jira/browse/MYFACES-2874 Project: MyFaces Core Issue Type: Bug Components: General Affects Versions: 1.2.9 Reporter: Michael Freedman MyFaces implements the required JSP writebehind support via a mechanism that involves pushing a special responsewrapper which implements an internal API in its ViewHandler prior to dispatch and then recognizing this response in the (view) tag handlers so it knows to call the internal API to flush the pre-view content. Problem is MyFaces core implements this function as a ServletResponseWrapper. This prevents writing an equivalent PortletResponseWrapper for use in the portlet bridge case as a response can't be both a ServletResponseWrapper and a PortletResponseWrapper. Minimum solution is to do what Myfaces 2.0 core does which is to define an interface defining the internal APIs and then have the tag handlers check that the response object implements the interface. MyFaces 2.0 does this via an instanceof check which is okay -- but by doing so requires the portlet developer configure an appropriate PortletResponseWrapper for use by the bridge (the bridge can't have dependencies on any particular Faces impl). Best solution is to do what Mojarra does which is to use reflection to see if the response object implements the needed method. In this way the Bridge can support a wrapped response with the extra methods without any explicit dependencies on the Faces impl -- and we avoid any work by the portlet developer to enable write behind support in the portlet environment. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.