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

Dan Liliedahl dliliedahl at efoundry.com
Tue Feb 26 18:21:31 CET 2008


You might try using the <f:verbatim> or <f:otputText> tags instead:


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

-or-

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


-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Hossfeld, Felix
Sent: Tuesday, February 26, 2008 11:58 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] Problem integrating jsf-ri 1.2 p4 with OpenCms 7.0.3

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


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list