Hi Diogo. I rewrote the ANT script from scratch and it is now working just
fine. No idea for now about what was going wrong however. Thanks for your
help,
Bertrand
From: "Diogo Quintela (EF)" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
To: "'Tomcat Developers List'" <tomcat-dev@jakarta.apache.org>
Subject: RE: DeployTask gives "MalformedURLException: unknown protocol: c"
Date: Fri, 3 Jun 2005 15:00:29 +0100
You have to use two slahes.
--> localWar="file://C:/Training/training.war"
Cumps
Diogo
-----Original Message-----
From: Bertrand Fontaine [mailto:[EMAIL PROTECTED]
Sent: sexta-feira, 3 de Junho de 2005 13:42
To: tomcat-dev@jakarta.apache.org
Subject: DeployTask gives "MalformedURLException: unknown protocol: c"
Hello,
I have a problem with the ANT Deploy task. The error message is
"java.net.MalformedURLException: unknown protocol: c". I have found in the
archives that some people identified a bug that was giving the exact same
message. The problem has been fixed at that time in catalina-ant.jar.
However, I am running the latest versions of all libraries ... Here are the
details:
Tomcat: installed from jakarta-tomcat-5.5.9.exe
Ant: version 1.6.4
Java: SUN'JVM "1.5.0_03"
OS:Windows XP
Ant script extract:
<target name="install">
<deploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"
localWar="file:/C:/Training/training.war"
/>
</target>
In order to valide the syntax of the localWar argument, I wrote the
following program:
import ...
public class Test {
public static void main(String args[]) {
URL url = Test.class.getResource("/training.war");
System.out.println(url);
DeployTask deployTask = new DeployTask();
deployTask.setLocalWar(url.toString());
deployTask.setUsername(...);
deployTask.setPassword(...);
deployTask.setUrl(...);
deployTask.setPath(...);
deployTask.execute();
return;
}
}
I don't have the error message and the web app is indeed deployed. However,
when I copy-paste the result of url.toString() in the XML version of the
ANT
script (cf. extract), I have the error message.
Any idea ?
Bertrand
_________________________________________________________________
Free blogging with MSN Spaces http://spaces.msn.com/?mkt=nl-be
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Free blogging with MSN Spaces http://spaces.msn.com/?mkt=nl-be
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]