2010-08-18 133 views
0

当在tomcat6中使用dwr部署应用程序时,发现“配置类org.directwebremoting.servlet.DwrListener的应用程序侦听器时出错”的错误。 这里是我的web.xml遇到“配置类org.directwebremoting.servlet.DwrListener的应用程序侦听器时出错”

<display-name>DWR (Direct Web Remoting)</display-name> 
    <description>A Simple Demo DWR</description> 
    <listener> 
    <listener-class>org.directwebremoting.servlet.DwrListener</listener-class> 
    </listener> 


<servlet> 
    <servlet-name>dwr-invoker</servlet-name> 
    <display-name>DWR Servlet</display-name> 
    <description>Direct Web Remoter Servlet</description> 
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> 

<!-- This should NEVER be present in live --> 
<init-param> 
    <param-name>debug</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- Remove this unless you want to use active reverse ajax --> 
<init-param> 
    <param-name>activeReverseAjaxEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- By default DWR creates application scope objects when they are first 
used. This creates them when the app-server is started --> 
<init-param> 
    <param-name>initApplicationScopeCreatorsAtStartup</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- WARNING: allowing JSON-RPC connections bypasses much of the security 
protection that DWR gives you. Take this out if security is important --> 
<init-param> 
    <param-name>jsonRpcEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- WARNING: allowing JSONP connections bypasses much of the security 
protection that DWR gives you. Take this out if security is important --> 
<init-param> 
    <param-name>jsonpEnabled</param-name> 
    <param-value>true</param-value> 
</init-param> 

<!-- data: URLs are good for small images, but are slower, and could OOM for 
larger images. Leave this out (or keep 'false') for anything but small images --> 
<init-param> 
    <param-name>preferDataUrlSchema</param-name> 
    <param-value>false</param-value> 
</init-param> 

<!-- This enables full streaming mode. It's probably better to leave this 
out if you are running across the Internet --> 
<init-param> 
    <param-name>maxWaitAfterWrite</param-name> 
    <param-value>-1</param-value> 
</init-param> 


    <init-param> 
    <param-name>org.directwebremoting.extend.ServerLoadMonitor</param-name> 
    <param-value>org.directwebremoting.impl.PollingServerLoadMonitor</param-value> 
</init-param> 



<!-- 
For more information on these parameters, see: 
- http://getahead.org/dwr/server/servlet 
- http://getahead.org/dwr/reverse-ajax/configuration 
--> 
<load-on-startup>1</load-on-startup> 
    </servlet> 

回答

2

你得到一个ClassNotFound的错误呢?

你把dwr.jar放在你的webapp的WEB-INF/lib目录下吗?

+0

我重新安装tomcat和错误消息以某种方式改为SEVERE:为servlet分配异常dwr-invokerjava.lang.ClassNotFoundException:org.apache.commons.logging.LogFactory 然后我将库包含到lib /和问题解决了。 – user415726 2010-08-19 01:33:21

+0

非常感谢,它解决了我的问题。可以想象,IDE太笨了,它不知道自动复制jar。 – DiveInto 2011-03-31 13:43:48

+0

@DiveInto:如果IDE太笨的话。不要使用它。 :-P – 2015-02-10 12:23:32

相关问题