We're still having issues with our reverse proxy. This doesn't even involve the redirect issue yet. When our form hits user-defined validation errors we pass messages back to the feedback panel an then do nothing (so the default behavior kicks in to send it back to the form page). But the url it comes up with to return to the page is bogus. The wicket logs output:
DEBUG 2007-06-07 10:54:38,378 http.WebResponse (redirect:196) - Redirecting to ?wicket:interface=:0:::: which is just the query string. Am I missing some major configuration parameter? Or is the default behavior just not doing the right thing? Thanks. Joel hillj2 wrote: > > Well after playing around with setContextPath() a bit, we've decided to > try and get 1.3 working. It would be nice if it had an official release, > but for now we only have one form done in wicket, so that shouldn't be too > much of a problem. By the time we have more wicket pages a stable 1.3 > release will probably be available. Thanks for you help, I'll let you > know how it turns out (or if we still have issues). > > Joel > > > > Al Maw wrote: >> >> Joel Hill wrote: >>> We have a JSP servlet application that we're slowing beginning to >>> convert over to wicket. Our first wicket page is a form with submit and >>> cancel buttons, either of which (unless there is a validation error) >>> will redirect the user back to the old servlet using the following >>> code: >>> >>> protected void onSubmit() { >>> String contextPath = >>> getApplication().getApplicationSettings().getContextPath(); >>> String url = contextPath + "/servletPath?queryString"; >>> getRequestCycle().setRequestTarget(new RedirectRequestTarget(url)); >>> } >>> >>> The problem is that our app is behind a reverse proxy and >>> getContextPath() is getting the path of the webserver our app is running >>> on, not the reverse proxy's path, and so the redirect fails. Is there >>> another way to redirect our form back to the non-wicket servlet after a >>> form submit/cancel? So far the only way I've been able to get it to >>> work is by grabbing the "Referer" header of the http request, and then >>> parsing it so I can replace the path of our wicket servlet with our >>> non-wicket servlet, but I've read it's up to the client whether or not >>> that header gets sent, so if it's not there, there's no other way I know >>> of to get the correct path. >>> >>> We're using wicket 1.2.5 on an OC4J 10.1.3 webserver. >> >> Yeah, in 1.2.x you'll have to call setContextPath() on the application >> settings object so it does the right thing (probably returns "/" in this >> case). >> >> There's very little you can do with version 1.2.x to make this nice, I'm >> afraid. We've put a whole load of work in for 1.3.x to make it work >> transparently behind a reverse proxy. For example, this case could be >> handled elegantly using Request.getRelativePathPrefixToContextRoot(), >> which will give you an appropriate number of "../" to prepend to make it >> all work. >> >> Al >> >> -- >> Alastair Maw >> Wicket-biased blog at http://herebebeasties.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 >> >> > > -- View this message in context: http://www.nabble.com/Form-redirect-issue-tf3872278.html#a11010390 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