Bugs item #1339699, was opened at 2005-10-27 19:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1339699&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.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Janne Hietamäki (jannehietamaki)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid resource links when running in root context.
Initial Comment:
When running wicket (HEAD) in root context autolinking
produces broken links like this:
<link
href="//resources/com.xxx.xxx.XXXPage/css/document.css"
type="text/css" rel="stylesheet"/>
At least firefox interprets two slashes as a empty
server and does not find the files.
This can be fixed at WebPage.java like this:
------------
/**
* @param path
* The path
* @return The url for the path
*/
public String urlFor(final String path)
{
if ((path == null) ||
(path.trim().length() == 0))
{
return
urlPrefix(getWebRequestCycle()).toString();
}
else
{
String
prefix=urlPrefix(getWebRequestCycle()).toString();
if(prefix.endsWith("/") ||
path.startsWith("/"))
{
return
urlPrefix(getWebRequestCycle())+path;
}
return
urlPrefix(getWebRequestCycle()) + "/" + path;
}
}
------------
urlPrefix() returns a slash when prefix would otherwise
be empty, so we can not add the other slash.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1339699&group_id=119783
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop