|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
dwr can't find any classes?? Spring+dwrHi,
I'm trying to integrate dwr with spring. but dwr could not find any classes registered. my error is "No class by name: Service" Here is my web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>ReverseAjax</display-name> <servlet> <servlet-name>TestServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>TestServlet</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet> <servlet-name>dwr</servlet-name> <servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet-mapping> <servlet-name>TestServlet</servlet-name> <url-pattern>/TestServlet</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app> TestServlet-servlet.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"> <!-- Mandatory DWR configuration --> <dwr:configuration /> <dwr:controller id="dwrController" debug="true" /> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property value="true" name="alwaysUseFullPath"></property> <property name="mappings"> <props> <prop key="/dwr/**/*">dwrController</prop> <prop key="/interface/**">dwrController</prop> <prop key="/engine.js">dwrController</prop> <prop key="/util.js">dwrController</prop> </props> </property> </bean> <bean class="utils.Service" id="Service"> <dwr:remote javascript="Service"> </dwr:remote> </bean> </beans> Can someone point me what is wrong with my configuration. ![]() Thanks, |
|
|
Re: dwr can't find any classes?? Spring+dwrUse DwrSpringServlet or <dwr:controller>. One or the other but not both
Regards
On Wed, Nov 4, 2009 at 4:09 PM, geek.shrek <miss_cool_666@...> wrote:
|
|
|
Re: dwr can't find any classes?? Spring+dwrThanks for the reply
![]() I removed the DwrSpringServlet, and keep <dwr:controller> but now the error become "[PageNotFound] No mapping found for HTTP request with URI [/ReverseAjaxTest/] in DispatcherServlet with name 'TestServlet'" Did I missed something else? Thanks,
|
|
|
Re: dwr can't find any classes?? Spring+dwrWith 3.0 try <dwr:url-mapping />. With 2.x David has posted several examples. Search the list
Regards
On Wed, Nov 4, 2009 at 5:15 PM, geek.shrek <miss_cool_666@...> wrote:
|
|
|
Re: dwr can't find any classes?? Spring+dwrhttp://www.butterdev.com/category/spring/
You can download the shell of a working config here. You may want to try starting here and then adding to it slowly.
On Wed, Nov 4, 2009 at 9:34 AM, Jose Noheda <jose.noheda@...> wrote: With 3.0 try <dwr:url-mapping />. With 2.x David has posted several examples. Search the list |
|
|
Re: dwr can't find any classes?? Spring+dwrThank you :)
I've tried your example. I'am able to run the example, but when I hit dwrSampleApp/dwr I have this error [PageNotFound] No mapping for [/dwrSampleApp/dwr] in DispatcherServlet with name 'dwrSampleApp'
|
|
|
Re: dwr can't find any classes?? Spring+dwrJust open the browser and go to:
http://yourhost:yourport/dwrSampleApp If you want to see the test page go to: http://yourhost:yourport/dwrSampleApp/dwr/index.html Read about mappings if you don't understand this. On Wed, Nov 4, 2009 at 1:23 PM, geek.shrek <miss_cool_666@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |