Re: Include wicket into jsp page

2011-09-07 Thread sauli.ketola
I've added wicket pages to a jsp-page based application using a jsp-page
which included the wicket page in an iframe. The reason it was done like
this was because the jsp-application had a menu bar that I didn't want to
clone in wicket. 
So basically I had a wicketPage.jsp which took as a parameter the wicket
page name. Then the newly created pages were in the menu bar as links like
wicketPage.jsp?page=SomeWicketPage. And the SomeWicketPage was mounted as
a bookmarkable page in the wicket application.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Include-wicket-into-jsp-page-tp3793485p3795832.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Include wicket into jsp page

2011-09-06 Thread Martin Grigorov
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