日期:2014-05-16  浏览次数:21062 次

jbpm 3.2.2+Tomcat 6.0.10+MySQL5.0.27/MSSQL2000全攻略四

????????? d)、修改web.xml文件

?????????????? jbpm-console\WEB-INF下打开web.xml文件,在servlet前加入以下listener,注意:把listener放在所有的servlet前面,我发现网上很多帖子里都没有提到这一点,不知道他们的程序是怎么跑起来的?残念ING~~~

<listener>

???? <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

</listener>

<listener>

???? <listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>

</listener>

?????????????这两个监听器很关键,大象先一直没有成功的原因就是没有加这个,而这两个监听器都在jsf-impl.jar包中,jbpm-console这个应用可是用jsf来实现的,如果你不加,则会产生如下这些错误:

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception

????????? at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)

????????? at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806)

????????? at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:656)

????????? at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)

????????? at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)