Bug 46400 - jspc does not work correctly if the destination is windows unc path
Summary: jspc does not work correctly if the destination is windows unc path
Status: RESOLVED DUPLICATE of bug 43150
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 6.0.14
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-15 08:05 UTC by Sergey Bushkov
Modified: 2008-12-23 07:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***