dwr.xml:
<dwr>
  <allow>
    <create creator="spring" javascript="codedbService">
      <param name="beanName" value="codedbService"/>
    </create>
  </allow>
</dwr>
ApplicationContext.xml:
<bean id="codedbService" class="com.zjm.books.code.services.CodeService">
<property name="codeDAO">
<ref bean="codedbDAO" />
</property>
</bean>web.xml:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>

<filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter> <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter> <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>    <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>
    </servlet>
    <servlet-mapping>
       <servlet-name>dwr-invoker</servlet-name>
       <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping> <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list> <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>有dwr.jar/bsf.jar包
打开,http://localhost:8888/myssh2/dwr
显示:There is no Action mapped for namespace / and action name dwr.