Sitemesh uses the deprecated ".toURL" method to get streams to read files, which warns that special and illegal URL characters are not escaped. I'd like to use the special character '#' in the war name, so that tomcat deploys it to a subfolder, but after converting the path to the sitemesh.xml file to an URL, it's interpreted as an anchor, and it can't load the config files.
The solution is just to replace the call to .toUrl in the file objects to the suggested in the deprecated comment: "toURI().toURL()".
Fix the use of deprecated method .toURL in File objects. Fixes issue #18
The fix doesn't really help as it still wants to make an URL from a file that is already confirmed to exist an be readable.
Why not just make a
is = new FileInputStream(configFile);
this works with paths that have the special char "#" in them.
ok, had a small other problem here, toURI().toURL() works for the "#" issue, but do we really need it?