The behavior of install and deploy are very different. "install" runs your app from wherever you point the docBase to. deploy using HTTP PUT to upload the war file to the manager app work directory (as you've found). Also, deploy is permanent (at least until undeploy) as it causes a physical modifcation of server.xml which "install" does not.
Now, as far as reading config files, you must be counting on File IO to read the files. This is not portable. You should be doing no file IO except to, possibly, directories specified via server configuration of the tempdir that the servlet spec defines. To read properties files, use the following...
InputStream is = getServletContext().getResourceAsStream("/WEB-INF/my.properties");
The feed the inputstream into a Properties object.
This will work whether you are deploying from a .war file or from a directory. This is the correct way to do things. If you don't want to do this, then don't expect the deploy task to work for you.
Jake
At 11:13 PM 3/20/2003 -0600, you wrote:
Hi,
When using the Tomcat Ant tasks to deploy (install or deploy) a war, where should the war and extracted archive end up?
Is it supposed to deploy to the work subdirectory or webapps?
The problem I am having is that I get a nearly successful deploy with either install or deploy - the war ends up in the manager subdir (as expected) and the jars from the war are extracted to an appropriate work subdir (as expected), but the properties files in the war (in WEB-INF) are not extracted to the WEB-INF dir of the appropriate work subdir - which is an unexpected error. So when the app starts, errors occur from lack of reading the needed property files.
Also, no files are placed in the webapps dir structure as when placing a war in the webapps dir, but I interpret this as expected behavior from the docs.(?)
I am wondering if I am missing a configuration item or similar, but cannot determine what.
I have spent many days trying different things and searching the web and archives with no info. Is there something in the docs I have missed? Appreciate any pointers or answers. TIA.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
