問題なく動作する Apache Wiket + Spring Web アプリケーションがあります。現在、Spring は DI フレームワークを使用して、モバイル アクセスをフィルタリングしています。アプリケーションで Spring Rest を使用する予定です。既存の Web xml でこれを行う方法を教えてください。
最初は、Rest Api は既存の Web セッションでデータ (ajax 呼び出しを使用する ui ページ) にアクセスするために使用されます。例: 既存の http セッションからの残りの呼び出しは、既存の http セッションにアクセスできる必要があります。何か案が ?お時間をいただきありがとうございます。
私の考えは Tag で '<code>org.springframework.web.servlet.DispatcherServlet' を使用することでしたが、同じセッションを共有したいのはこの方法ではないでしょうか?
私の既存のweb.xml
(働いている)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:myapp-spring-config.xml
</param-value>
</context-param>
<filter>
<filter-name>myapp</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationFactoryClassName</param-name>
<param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
</init-param>
</filter>
<filter>
<filter-name>myappMobileRequestFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>myappMobileRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>