> Hi,
>
> I've got a page mounted on "/path1".
>
> I've got some files in a directory in my webapp root on "/path1/dir"
>
> How can I tell Wicket to give control back to the servlet container for
> dir? Currently (even using QueryStringUrlCodingStrategy) the mount eats
> /path1/dir and doesn't let me access the files there...
>
> Regards,
> Sebastiaan

I looked at the wicket filter code, and it does not seem that this is possible at the moment (though I might be missing something). I see at least two possible ways to add this feature:

1) using a special exception (I did not think about the name):

        if (isWicketRequest(relativePath))
        {
                try
                {
                        ...
                }
                catch (NotWicketAfterAllException e) {
                        // Pass down the filter chain.
                        chain.doFilter(request, response);
                }
                finally
                {
                        // always unset the application thread local
                        Application.unset();
                        RequestContext.unset();
                }
        }

2) using a special RequestCodingStrategy, i.e. UnmountedRequestCodingStrategy and tweaking isWicketRequest to return false if it detects this request coding strategy...

The first solution is more powerful (it allows you to pass the request down the filter chain from pretty much anywhere), but it might be a bit dangerous (what if you already read from the request/response, etc), and it requires your own "request strategy" implementation to check if it happens to be an url that you want to pass down the filter chain which usually ends up being ugly string compares)...

The second solution is cleaner in my opinion and it would allow you to "unmount" or mount as a "pass through" specific urls...

What do you guys think?

Regards,
Sebastiaan

Sebastiaan van Erk wrote:

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to