dwr使用异常

异常信息如下:

2009-08-09 10:35:40 [org.directwebremoting.servlet.ExceptionHandler : org.directwebremoting.util.CommonsLoggingOutput.warn(CommonsLoggingOutput.java:59)]-[WARN] Error: java.lang.SecurityException: No class by name: validates
 2009-08-09 10:35:40 [org.directwebremoting.servlet.ExceptionHandler : org.directwebremoting.util.CommonsLoggingOutput.warn(CommonsLoggingOutput.java:67)]-[WARN] Sent 501
 java.lang.SecurityException: No class by name: validates
    at org.directwebremoting.impl.DefaultCreatorManager.getCreator(DefaultCreatorManager.java:189)
    at org.directwebremoting.impl.DefaultRemoter.generateInterfaceScript(DefaultRemoter.java:158)
    at org.directwebremoting.servlet.InterfaceHandler.handle(InterfaceHandler.java:45)
    at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
    at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
    at org.directwebremoting.servlet.DwrServlet.doGet(DwrServlet.java:132)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at com.citsoft.comm.EncodingFilter.doFilter(EncodingFilter.java:45)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:595)

 

解决方法:

    (1)去掉加载页面中 <script type="text/javascript" src="/qy/dwr/interface/validates.js"></script>的引用

    (2)从dwr.jar中org.directwebremoting包中找到dwr.xml配置文件,然后copy 如下代码片段

           <!DOCTYPE dwr PUBLIC
    "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
    "http://getahead.org/dwr/dwr20.dtd">

       到你的应用中(WEB-INF/dwr.xml)中

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值