title: How to integrate Spring Rest with Apache Wicket web application
body: <p>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 .<br>
  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. </p>
  
  <p>My idea was to use ‘<code>org.springframework.web.servlet.DispatcherServlet</code>’ with a 
   Tag , however my doubt is this way I want be sharing same session  ?</p>
  
  <p>My existing <code>web.xml</code> (working)</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          classpath:myapp-spring-config.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;filter&gt;
      &lt;filter-name&gt;myapp&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.wicket.protocol.http.WicketFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;applicationFactoryClassName&lt;/param-name&gt;
          &lt;param-value&gt;org.apache.wicket.spring.SpringWebApplicationFactory&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  
  &lt;filter&gt;
     &lt;filter-name&gt;myappMobileRequestFilter&lt;/filter-name&gt;
     &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
     &lt;filter-name&gt;myappMobileRequestFilter&lt;/filter-name&gt;
     &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
     &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
     &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;
          org.springframework.web.context.ContextLoaderListener
      &lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;listener&gt;
  &lt;listener-class&gt;
      org.springframework.web.context.request.RequestContextListener
  &lt;/listener-class&gt;
  </code></pre>
  
  <p></p>