I believe I have identified a rather serious bug in WicketFilter. I'm using a recent 1.3 snapshot, and I have recently updated our application to leverage the WicketFilter instead of WicketServlet. This is working great in Tomcat, but when we deploy to our Weblogic server, Wicket dies an ugly death.
After a lot of debugging in both Weblogic and Tomcat, I was able to track down the source of the problem. The problematic method is WicketFilter.getRelativePath. The method uses request.getServletPath to return the relative path. This works in Tomcat, because Tomcat is nice enough to return the the relative request URL when you call request.getServletPath, even if it is not technically mapped as a servlet in web.xml. But Weblogic is more strict, and so because the URL is not technically a real servlet, it just returns "". This causes the Wicket code to think the URL is for the root path, and so it tries to append the relative path to the registered home page. Since the method always returns "", Wicket does this forever, continuing to append the home page path, redirect, then get confused, again and again. Wanted to post a message to warn others and to find out if anyone was already aware of this. I was able to code up a workaround, since the method was public, copying most of the original logic into my overridden method. But it got a bit hacky since I didn't have access to private members of WicketFilter. Essentially, I replaced the malfunctioning first line: String path = request.getServletPath(); With something that seems to work better: String contextPath = StringUtils.nullToEmpty(request.getContextPath()); String path = request.getRequestURI(); if (path.startsWith(contextPath)) { path = path.substring(contextPath.length()); } -Jason -- View this message in context: http://www.nabble.com/WicketFilter-doesn%27t-work-in-Weblogic--Wicket-1.3--tf3724994.html#a10424457 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user