当前位置: 代码迷 >> Java Web开发 >> java+dwr技术webxml配置不成功咋回事
  详细解决方案

java+dwr技术webxml配置不成功咋回事

热度:207   发布时间:2016-04-12 22:10:04.0
java+dwr技术webxml配置不成功怎么回事?
本帖最后由 wll52 于 2013-08-30 18:46:59 编辑
如:我的web.xml 
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">



<!-- -----------我只要把下面这里删除了就好了怎么回事------------------一
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>

<init-param>
<param-name>pollAndCometEnabled</param-name>
<param-value>true</param-value>
</init-param>


 
<load-on-startup>1</load-on-startup>      
</servlet>

<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
------------------------------------>




  <display-name></display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>



二、dwr.xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr//dwr20.dtd">
<dwr>
    <allow>        
       
        <create creator="new" javascript="room">
            <param name="class" value="com.hoom.smack.tests"/>
        </create>
       
    </allow>
</dwr>
三、在WEB-INF/lib中加dwr.jar

运行后出错。如下:




2013-8-30 18:28:38 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\myeclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\Program Files\myeclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201211011550\tomcat\bin
  相关解决方案