tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Demidovich" <demi...@ngi.de>
Subject Trouble with JspCompiler (Ant task) under Windows
Date Sun, 15 Sep 2002 13:37:18 GMT
Hello

I've got a little problem. I'm installing tomcat (4.1.10 latest stable) on
disk D:.

my server.xml is:

<Server port="8005" shutdown="SHUTDOWN" debug="0">
 <Service name="Tomcat-Standalone">
  <Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75" enableLookups="true"
redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="60000"/>
  <Engine name="Standalone" defaultHost="localhost" debug="0">
   <Realm className="org.apache.catalina.realm.MemoryRealm"/>
   <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
    <Context path="/vs" docBase="e:/projects/vs/build/web" debug="1"
reloadable="true">
     <Realm className="my.own.realm.Realm40"/>
    </Context>
   </Host>
  </Engine>
 </Service>
</Server>

As you can see, "/vs" context is directed on disk E:.

The trouble is located in org.apache.tools.ant.PathTokenizer, function
nextToken. (Ant 1.5).

In my case the PathTokenizer contructor receives
"d:\\jdk1.3.1_03\\lib\\tools.jar;..\\bin\\bootstrap.jar;/E:/projects/vs/buil
d/web/WEB-INF/classes/;/E:/projects/vs/build/web/WEB-INF/lib/PBridgeJava_jdk
13.jar;....."
"/E:/" stuff made by org.apache.catalina.loader.WebappClassLoader, function
getUrls.(I have to say, that this "/E:/.. was made from normal e:\\... by
this getUrls).

So, because of implemenation PathTokenizer.nextToken function, the one
assumes that /E: is a separate part of path. And returns that as a
standalone token,
which in result is converting by org.apache.tools.ant.typesPath, function
translatePath (and resolveFile) to "D:\\E". (call to translatePath is coming
from
org.apache.jasper.compiler.Compiler, 272) The next token
"/projects/vs/build/web/WEB-INF/classes/" converts to
"D:\\projects\\vs\\build\\web\\WEB-INF\\classes".
So, the normal path was divided to 2, both are incorrect.

This, fortunatelly, work, if I place my project to
"d:/projects/vs/build/web". The path transalation works any way incorrect,
but because of resolveFile function,
second token is converting "correctly".

Looks like, here is 2 way to fix it. First - ant, second - WebappClassloader
shouldn't use URL and converting pathes from e:\\... to /e://....



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message