开发者

How Do Portlet-Bridge, Richfaces and ajax4jsf work together?

开发者 https://www.devze.com 2023-01-18 14:51 出处:网络
I am trying to get Liferay 6.0, JBoss portlet bridge 2.0 and Richfaces 4.0.0 working together by using the configuration as stated in JBoss Forum and the portlet bridge documentation. My goal is to us

I am trying to get Liferay 6.0, JBoss portlet bridge 2.0 and Richfaces 4.0.0 working together by using the configuration as stated in JBoss Forum and the portlet bridge documentation. My goal is to use JSF 2.0 when implementing protlets.

I use maven for building and deploying the portlet in Liferay and included the Richfaces dependancy like this:

<dependency>
  <groupId>javax.faces</groupId>
  <artifactId>jsf-impl</artifactId>
  <version>2.0.2-FCS</version>
</dependency>
<dependency>
  <groupId>org.jboss.portletbridge</groupId>
  <artifactId>portletbridge-api</artifactId>
  <version>2.0.0.CR1</version>
</dependency>
<dependency>
  <groupId>org.jboss.portletbridge</groupId>
  <artifactId>portletbridge-impl</artifactId>
  <version>2.0.0.CR1</version>
</dependency>
        <dependency>
            <groupId>org.richfaces</groupId>
            <artifactId>richfaces-bom</artifactId>
            <version>4.0.0.20100826-M2</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
<dependency>
  <groupId>com.sun.facelets</groupId>
  <artifactId>jsf-facelets</artifactId>
  <version>1.1.15.B1</version>
</dependency>

But when I use this configuration I get the following error:

 SEVERE: Exception starting filter ajax4jsf
 java.lang.ClassNotFoundException: org.ajax4jsf.Filter
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
  at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:269)
  at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
  at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
  at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
[...]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apa开发者_StackOverflowche.catalina.startup.Bootstrap.start(Bootstrap.java:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

So I looked again at the forum and found this post, which says in my opinion that ajax4jsf does not need any configuration in web.xml and portlet.xml anymore. So I threw it out and got the following error:

[TomcatInstrumentableClassLoader@1738d88] error can't determine annotations of missing type org.ajax4jsf.renderkit.AjaxViewRootRenderer

Now I am confused: Do I have to configure ajax4jsf in web.xml? Why isn't it found by Liferay? And what is this module good for anyway, JSF 2.0 implementation or richfaces proprietary functionality?


The only version of JBoss Portlet Bridge that supports JSF 2 is in alpha here. You can drop the jar in your lib folder with the 2.0.0.FINAL api jar. Also, there are maven based examples in svn that have a Liferay profile "mvn package -Pliferay".

0

精彩评论

暂无评论...
验证码 换一张
取 消