You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kyrindorx <ky...@gmail.com> on 2018/07/20 07:13:54 UTC

Wicket and Spring Rest (MVC & DispatcherServlet)

Hi,

I have to run a wicket app in the Servlet Context / Path "/*". I want to 
use Spring MVC with Rest on "/api/*".

I found the WicketSessionFilter and some infos about it, but I can't see 
a way to delegate into the Spring DispatcherServlet with "/*" bind on 
the Wicket application filter.

I'll thankful for some hints :)

Greats
Kyrindorx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket and Spring Rest (MVC & DispatcherServlet)

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Fri, Jul 20, 2018 at 10:13 AM kyrindorx <ky...@gmail.com> wrote:

>
> Hi,
>
> I have to run a wicket app in the Servlet Context / Path "/*". I want to
> use Spring MVC with Rest on "/api/*".
>

You will need to use "ignorePaths" parameter on WicketFilter to tell it to
ignore requests to /api/.
See
https://github.com/apache/wicket/blob/9e42a9548adb0da540e4e87d491f5824e778537e/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketServlet.java#L77-L80
but apply it on the filter, not servlet.


>
> I found the WicketSessionFilter and some infos about it, but I can't see
> a way to delegate into the Spring DispatcherServlet with "/*" bind on
> the Wicket application filter.
>

WicketSessionFilter helps to export the Wicket Application and Session
objects to other servlets and filters.
A Filter just wraps around other filters or servlets, so it delegates
automatically to any filters/servlets defined later in web.xml.
I.e. you need to define WicketSessionFilter before DispatcherServlet in
web.xml and it should just work.


>
> I'll thankful for some hints :)
>
> Greats
> Kyrindorx
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>