You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Renato Romano <r....@set-network.com> on 2003/04/14 17:26:23 UTC
Application Deployment with Ant
I'm using tomcat 4.1.18, and noticed that using ant for deploying
applications, the directory tree is not found under webapps, while this
is the case when simply copying the application war file under webapps.
This has consequences, for example, when referencing resources/files
using InputStreams. I know maybe this is not a correct way to access
resources in a web app, but i'm intersted in where my application is
under tomcat, and why not under webapps !!!??
Thanks
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Where is my application ?
Posted by Karsten Wutzke <kw...@web.de>.
No real advantage. Just that it's where I'd expect web apps to be...
It's a matter of good order.
Karsten
Jacob Kjome wrote:
>
> Not sure why, but you can think of the manager's work directory as a
> special case since it is a priviledged webapp running under Tomcat. Why
> do you need it under webapps? What advantage do you see?
>
> Jake
>
> At 05:34 PM 4/16/2003 +0200, you wrote:
>
>
>> Jacob Kjome wrote:
>>
>>> Well, sure it it, but you should get the inputstream from the
>>> Oh, and your .war file is delivered to:
>>> CATALINA_HOME/work/Standalone/localhost/manager (or something like
>>> that)
>>> Jake
>>
>>
>> Me again... ;-)
>>
>> Is there a reason *why* it is permanently delivered to the work/...
>> dir with deploy, though the work dir is explicitly called a temporary
>> directory (from Tomcat docs!). This might not be a problem for many
>> people, for me it is. Such things always confuse (Tomcat/Ant) newbies...
>>
>> Is there a way to get it to the webapps dir?
>>
>> Karsten
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Where is my application ?
Posted by Jacob Kjome <ho...@visi.com>.
Not sure why, but you can think of the manager's work directory as a
special case since it is a priviledged webapp running under Tomcat. Why do
you need it under webapps? What advantage do you see?
Jake
At 05:34 PM 4/16/2003 +0200, you wrote:
>Jacob Kjome wrote:
>
>>Well, sure it it, but you should get the inputstream from the
>>Oh, and your .war file is delivered to:
>>CATALINA_HOME/work/Standalone/localhost/manager (or something like that)
>>Jake
>
>Me again... ;-)
>
>Is there a reason *why* it is permanently delivered to the work/... dir
>with deploy, though the work dir is explicitly called a temporary
>directory (from Tomcat docs!). This might not be a problem for many
>people, for me it is. Such things always confuse (Tomcat/Ant) newbies...
>
>Is there a way to get it to the webapps dir?
>
>Karsten
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Where is my application ?
Posted by Karsten Wutzke <kw...@web.de>.
Jacob Kjome wrote:
>
> Well, sure it it, but you should get the inputstream from the
>
> Oh, and your .war file is delivered to:
>
> CATALINA_HOME/work/Standalone/localhost/manager (or something like that)
>
> Jake
>
Me again... ;-)
Is there a reason *why* it is permanently delivered to the work/... dir
with deploy, though the work dir is explicitly called a temporary
directory (from Tomcat docs!). This might not be a problem for many
people, for me it is. Such things always confuse (Tomcat/Ant) newbies...
Is there a way to get it to the webapps dir?
Karsten
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Where is my application ?
Posted by Jacob Kjome <ho...@visi.com>.
Well, sure it it, but you should get the inputstream from the
ServletContext object, not a FileInputStream. When you use the ant deploy
task, your app is served directly from the .war file which is perfectly
legitimate under the servlet spec. In fact, you have absolutely no
guaranteed access to the file system other than the temp directory provided
by java and and the servlet spec. So, you should be using...
context.getResourceAsStream("/WEB-INF/myresource.xml");
or just grab it off the classloader.
Oh, and your .war file is delivered to:
CATALINA_HOME/work/Standalone/localhost/manager (or something like that)
Jake
At 04:07 PM 4/16/2003 +0200, you wrote:
>I'm using tomcat 4.1.18, and noticed that using ant for deploying
>applications, the directory tree is not found under webapps, while this
>is the case when simply copying the application war file under webapps.
>This has consequences, for example, when referencing resources/files
>using InputStreams. I know maybe this is not a correct way to access
>resources in a web app, but i'm intersted in where my application is
>under tomcat, and why not under webapps !!!??
>
>Thanks
>Renato
>
>____________________________________
>Renato Romano
>Sistemi e Telematica S.p.A.
>Calata Grazie - Vial Al Molo Giano
>16127 - GENOVA
>
>e-mail: r.romano@set-network.com
>Tel.: 010 2712603
>_____________________________________
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Where is my application ?
Posted by Renato Romano <r....@set-network.com>.
I'm using tomcat 4.1.18, and noticed that using ant for deploying
applications, the directory tree is not found under webapps, while this
is the case when simply copying the application war file under webapps.
This has consequences, for example, when referencing resources/files
using InputStreams. I know maybe this is not a correct way to access
resources in a web app, but i'm intersted in where my application is
under tomcat, and why not under webapps !!!??
Thanks
Renato
____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA
e-mail: r.romano@set-network.com
Tel.: 010 2712603
_____________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org