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.

Thanks.

Joel

-------------------------------------------------------------------------
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

Reply via email to