jsf包冲突吗????
项目当中有几个主要包jsf-api,jsf-impl,myfaces-all,
目前有一个添加页面,tomcat启动正常,但是往里面添加数据后可以写入数据库,但是页面不跳转,并且提示我有两个参考实现,发生冲突
具体报错如下:
[http-8080-Processor25] INFO config.MyfacesConfig - Starting up Tomahawk on the RI-JSF-Implementation.
[http-8080-Processor25] INFO config.MyfacesConfig - Starting up Tomahawk on the MyFaces-JSF-Implementation
[http-8080-Processor25] ERROR config.MyfacesConfig - Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.
当我移走jsf-api和jsf-impl时,tomcat启动开始报错
Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
于是我保留以上两个包,去掉myfaces-all包时,tomcat又启动报错:
Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.
ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
web.xml中监听配置如下:
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener </listener-class>
</listener>
<listener>
<listener-class>de.mindmatters.faces.spring.context.ContextLoaderListener</listener-class>
</listener>
请高手帮忙看一下,究竟是怎么回事??谢谢
------解决方案--------------------顶一个,我也遇到这样的问题
而且,我JBOSS运行的时候还有这个错:
10:03:44,015 ERROR [[jsp]]
Servlet.service() for servlet jsp threw exceptionjava.lang.IllegalArgumentException at java.util.zip.ZipInputStream.getUTF8String(Unknown Source)
at java.util.zip.ZipInputStream.readLOC(Unknown Source)
at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
at java.util.jar.JarInputStream.getNextEntry(Unknown Source)
at java.util.jar.JarInputStream.getNextJarEntry(Unknown Source)
at org.jboss.web.tomcat.service.jasper.TagLibCache.scanJar(TagLibCache.java:324)
at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268)\
高手指教一下拉,,,,,
------解决方案--------------------myface包和jsf包好像不能一起用.
------解决方案--------------------<listener>
<listener-class>de.mindmatters.faces.spring.context.ContextLoaderListener </listener-class>
</listener>
估计是这条的关系吧,我看jsf-impl.jar中的class在myfaces-imple中都有.或者你找到 de.mindmatters.faces.spring.context.ContextLoaderListener 的源码,进去重新改下包名应该就OK了.