I have Apache Wiket + Spring web application that works without any issues .
At present Spring used DI framework and to filter Mobile access .
We are planning to use Spring Rest in our application , Can you advise me how do I do this in our existing web xml .
Initially Rest Api will be used by existing Web sessions to access data(ui pages using ajax calls ), Therefore I want Rest controllers able to access existing Wicket http session(if used logged in ) .
e.g. : rest call from existing http session should be able to access existing http session .
Any idea ? Thanks and appriciate your time.
My idea was to use ‘org.springframework.web.servlet.DispatcherServlet
’ with a
Tag , however my doubt is this way I want be sharing same session ?
My existing web.xml
(working)
<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>