Description
String path = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(HomePage.class, new PageParameters()).toString());
if HomePage is mounted to / the url will be http://host/./ and should instead be http://host/
only double dots are translated, single dots should be removed
Some other remarks:
the implementation is using StringBuffer, that could be changed to StringBuilder.
toAbsolutepath should accept CharSequence instead of String (that will remove the need for the .toString() in the above sample