[opencms-dev] Problem integrating jsf-ri 1.2 p4 with OpenCms 7.0.3

Hossfeld, Felix Felix.Hossfeld at bonprix.net
Tue Feb 26 17:58:14 CET 2008


Hi!

I'm currently having an issue integrating with java server faces. My setup is pretty much like the one recommended at http://opencms-wiki.org/Java_Server_Faces_%28JSF%29 - except I'm using JBoss 4.2.2.GA which ships with Sun' JSF reference implmentation 1.2 (p4 b16 to be exact).

The problem is that pages are not shown completly. To be more precise: The non-JSF-Content ist replaced by the JSF-Content. The JSF content is written to the page and the non-JSF stuff is appende to that shortened by length of the JSF content., e.g.

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f">
Opencms is a great product.
<f:view>
  <h:outputText value="#{100 * 100}" /
</f:view>


will render to something like this:

"10000cms is a great prod"

I would have expected it to output:

"OpenCms is a great Product.10000"

(This is not 100% true since the taglib declaration cause linefeeds to be inserted into the content which are also replaced by JSF-conent. But I think you will get the idea.)

I have traced this down to the CmsFlexRequestDispath, l. 193. After calling the RequestDispather.include()-method the CmsFlexResponse contains only the data before the f:view element. Since this determines the size of the response in CmsJspLoader l. 278 the reponse is too short to take the additional jsp content and everything is cut off.

I would be thankful for any suggestions.

Best regards

Felix Hoßfeld




More information about the opencms-dev mailing list