[原创]DWR2 RPC会话过虑简易处理

    <servlet>
        <servlet-name>dwr-invoker</servlet-name>
        <display-name>DWR Servlet</display-name>
        <servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>true</param-value>
        </init-param>
        <!--the defautl config file would be disable-->
        <!--<init-param>  
            <param-name>config-1</param-name>  
            <param-value>WEB-INF/dwr1.xml</param-value>  
        </init-param>  -->
        <load-on-startup>10</load-on-startup>        
    </servlet>        
    <servlet-mapping>
        <servlet-name>dwr-invoker</servlet-name>
        <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>

按以上配置发现DWR RPC的调用URL基本为[webapp]/dwr/call/plaincall/XXX.ZZZ.dwr,其中XXX为暴露的服务类名,ZZZ为方法名。
url根据url-pattern设置会有所变化,至此各位兄弟应该知道在filter中应该过虑哪些URL了。

完整URL示例:
lab/dwr/call/plaincall/DemoAction.getPerson.dwr

你可能感兴趣的:(Web,xml,servlet,DWR)