2008/1/23, Al Sutton <[EMAIL PROTECTED]>:
>
> Hi All,
>
> I've finally found the cause of the "space in the path" problem for the
> FreeMarker test which was failing and registered it as WW-2452.
>
> Now the simplest fix I can see is to change the offending line of code
> from;
>
> servletContext.setRealPath(FreeMarkerResultTest.class.getResource("
> someFreeMarkerFile.ftl").getFile());
>
> to
>
> servletContext.setRealPath(FreeMarkerResultTest.class.getResource("
> someFreeMarkerFile.ftl").getFile().replaceAll("%20",
> " "));
>
> where the replaceAll changes back the %20's to spaces and thus the path is
> OK.
>
> Does anyone feel this is too much of a hack and knows a better way,
> because
> I'm a bit uncomfortable with it?For me it's ok. For some reasons, URIs accepts spaces and URLs want %20 (or was it the opposite?). This is not a hack, since it is test code. Antonio
