Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Thelma Murray   on Mar 19 In Java Category.

  
Question Answered By: Este Ferrrari   on Mar 19

As far as I remember dwr  2 uses spring  namespaces which is a Spring 2 feature. So I suggest you to upgrade to Spring 2.0.x before you start. I believe that You will face no serious problem  in this upgrade.
----------------------------------------------------------------------------------
I had once configured  spring with DWR old version. As far as I remember you had two options to configure dwr:
1- defining the dwr servlet  in web.xml
2- defining the dwr servlet as a bean in spring context files.

I can see that you have configured both. I guess this is wrong. Check this out.
Take away that servlet "dwr-invoker" from the web.xml but don't touch the main servlet. It is configured correctly.
And in the simpleUrlHandlerMapping bean, take away all of those


<prop key="dwrSomething">dwrController</prop>
and replace them with the red line in the end of the props like this:
<property name="mappings">
<properties>
<prop key="/first.htm">firstController</prop>
<prop key="/last.htm">lastController</prop>
<!-- This mapping is required for DWR / Spring configuration -->
<!-- NOTE: This mapping should always be the last line cause it handles
all the calls which are not catched by prev mappings -->
<prop key="/**/*">dwrController</prop>
</properties>
</property>

This was the trick that we used to use with dwr 1 to let spring map dwr from inside. If you have more problems, I suggest you to join the spring and dwr mailing list. This must have been a frequently asked question out there and you see lots of related questions and answers that might be useful as well.

Share: