Bug 46400

Summary: jspc does not work correctly if the destination is windows unc path
Product: Tomcat 6 Reporter: Sergey Bushkov <hrendalf>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 6.0.14   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description Sergey Bushkov 2008-12-15 08:05:18 UTC
Run the following commands:

> cd 
d:\testunc

> java -cp <tomcat;etc> org.apache.jasper.JspC 
  -d \\server001\mytestdir\compiledjsp
  -webapp \\server001\test\mywebapp
  -p jsp.precompiled.webapp
  -source 1.4 -target 1.4

The java classes are generated; but placed to wrong location:
d:\mytestdir\compiledjsp

The server name is ignored, the directory is created on the current drive.

Most probably, the problem is caused by the deprecated File.toURL() method,
which does not process UNC paths correctly.

For example, in the JspCompilationContext class:

protected void createOutputDir() {
  ...
  baseUrl = options.getScratchDir().toURL();
  ...
}
Comment 1 Mark Thomas 2008-12-23 07:22:37 UTC
This has the same root cause as 43150 which was fixed in 6.0.17 (so you'll need 6.0.18 - .17 was never released).

*** This bug has been marked as a duplicate of bug 43150 ***