tomcat-dev mailing list archives

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

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"
     <Realm className="my.own.realm.Realm40"/>

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

The trouble is located in, function
nextToken. (Ant 1.5).

In my case the PathTokenizer contructor receives
"/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, function
translatePath (and resolveFile) to "D:\\E". (call to translatePath is coming
org.apache.jasper.compiler.Compiler, 272) The next token
"/projects/vs/build/web/WEB-INF/classes/" converts to
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:   <>
For additional commands, e-mail: <>

View raw message