Hello!

We're slowly migrating a big legacy jsp application into wicket and I'm
evaluating the ways incorporate wicket components into existing jsp pages.
Right now I'm trying to figure out how to include a wicket component through
<jsp:include> tag. As I've spent some time debugging I think that's what's
going on:

1. When I use the <jsp:include> tag the RequestDispatcher.include(request,
response, ...) is being called.
2. The RequestDispatcher tries to preserve original Request, so it puts the
actual include's request URI into some attribute inside the request, while
leaving the original requestURI and contextPath unmodified from the original
request - I see that Catalina's servlets (e.g. DefaultServlet) specifically
accounts for the case that the request might be from include and, later,
grabs the URI from these attributes.
3. Once WicketFilter tries to determine whether the request is to be
processed by Wicket it takes the requestURI and contextPath from the
original Request and ignores the path I've used in <jsp:include> tag.

As far as I understand I can try to modify the Request and replace the
requestURI and the contextPath with the ones I need (from the tag), but
before I go through this path I wanted to do a sanity check :)

Is there, perhaps, a more convenient way to achieve the same result? Would
there be some gotchas to look out for?

Regards,
Ilya

Reply via email to