Feature Requests item #1433735, was opened at 2006-02-17 17:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1433735&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Priority: 5
Submitted By: Alastair Maw (almaw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Proxying breaks because ContextPath is included in links

Initial Comment:
This is currently blocking deployment on our live
systems, so for me, it's a critical bug.

Wicket constructs its href/link URLs to be absolute by
using the context path, typically like so:

getContextPath() + '/' + getRelativeURL();

So form actions, link hrefs, etc. look like this:
  "/contextPath/wicketServlet?params=foo"

If you're hiding your webapp behind a front-end proxy
server, so that...

appName.domain.com/ -> server.domain.com/contextPath/

...then this breaks things badly.

For my old JSP-based stuff, I just make all the URLs
relative, and everything just works. For top level
template includes, which need to work on all pages no
matter the depth, I'd set a response param to tell the
include what depth level I was at, and it'd insert some
"../"s appropriately. Not very pretty, but simple and
it works.

There are two ways to fix this:

1) Make the context path configurable in the
ApplicationSettings (and make Wicket cope with empty
ones elegantly so that it doesn't put in double // at
the start of the href).

2) Make all the URLs in wicket relative.

Option 2 is nicest, because then you don't have to
configure anything, but is probably quite a lot of
work, particularly for cached markup for image src=""
links, etc.

Option 1 would presumably be fairly easy to achieve?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1433735&group_id=119783


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to