Few years back I also had to do this exercise. But we just started
removing JSP pages and replacing them with Wicket based ones.
So we just had to generate proper links in both directions.

Another approach which is similar to what you do is described at
http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/

On Tue, Sep 6, 2011 at 4:57 PM, Ilya German <igerly.w...@gmail.com> wrote:
> 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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to