users@glassfish.java.net

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

From: Michael Weigmann <michael.weigmann_at_hsh-berlin.com>
Date: Mon, 19 Mar 2007 10:48:55 +0100

Hi Jan,

thanks for the answer. I added an issue with a more elegant solution. There
don't seem to be other areas that need to be fixed. The jsp-compilation runs
perfectly with that.

Cheers,
Michael

>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
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net