WebRequestCodingStrategy assumes that a shared resource URL should always be
relative to the Wicket handler
-----------------------------------------------------------------------------------------------------------
Key: WICKET-2554
URL: https://issues.apache.org/jira/browse/WICKET-2554
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.1
Environment: Windows XP Pro, OSGi, Eclipse 3.5, Java 5
Reporter: Eric Glass
We use an absolute URL for the shared resources and as long as the page is
directly under the Servlet context we have no problems, but for pages that have
additional paths, then it is converted into a bad relative URL. For Example:
/cjs/app/test.page - This page's shared resource URLs are not modified, so
http://localhost:8080/crtv/css/cjs-3.3.1B.css is correct
/cjs/app/orders/contentbuilder.page - This page's shared resource URLs are all
modified causing them to be ../http://localhost:8080/crtv/css/cjs-3.3.1B.css,
which is bad; and of course with JavaScript it causes us a lot of problems
I propose a simple fix in method: public final CharSequence encode(final
RequestCycle requestCycle, final IRequestTarget requestTarget)
Change the following line from:
if (!sharedResourceURL && portletRequest)
To:
if (url.toString().startsWith("http://") ||
url.toString().startsWith("https://") || (!sharedResourceURL && portletRequest))
Thanks!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.