Dear Glassfish-developers,
I'm not using Glassfish directly but one of the components (Jasper) inside
an embedded Jetty webserver. I have dificulties getting the jsp-compilation
to work when using an unc path as scratch dir. The problem lies in method
createOutputDir() of class JspCompilationContext where the outputDir is set
as follows:
baseUrl = options.getScratchDir().toURL(); // baseUrl is correct
String outUrlString = baseUrl.toString() + '/' + path;
URL outUrl = new URL(outUrlString); // outUrl is correct, too
outputDir = outUrl.getFile() + File.separator;
With outUrl.getFile() the server part gets missing, so adding this quite
innocently helped for me:
if( outUrl.getHost() != null ) {
outputDir = "//"+outUrl.getHost()+outputDir;
}
Maybe there is another way without adding/changing code to overcome that
problem, but i don't see it. Would be nice if someone gives a comment to
this.
Thanks a lot,
Michael