users@glassfish.java.net

Re: jsp-compilation problem when using unc path as scratch dir

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 16 Mar 2007 13:20:28 -0700

Hi Michael,

Michael Weigmann wrote On 03/16/07 07:33 AM,:

>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.
>
>

Your patch makes perfect sense!

Have you found other areas in the JSP compiler that would require
a similar fix?

Can you please file an issue against the web-container,
or let me know if you would like me to file one on your behalf?

Thanks!


Jan


>Thanks a lot,
>Michael
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>