You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Michalis Petropoulos <mi...@enosysmarkets.com> on 2002/01/03 22:26:54 UTC

Application Manager bug in org.apache.catalina.core.StandardHost.java

Hello all,

I'm using the "manager" application to re-deploy a web application. First, I
use the "remove" operation to remove the web app and then I use the
"install" operation to deploy a new web app with the same name. I use a WAR
file and the "unpackWARs" attribute of the "Host" element in the
"server.xml" is set to true.

The problem is that the files in the web app directory do not get updated.
The "remove" operation does not delete the web app directory under the
"webapps" directory, and the "install" operation does not overwrite the old
files.

I located the problem in:

"org.apache.catalina.core.StandardHost.java",

where the method:

"public void remove(String contextPath);" (line 772)

that implements the "remove" operation does not delete the web app directory
under the "webapps" directory. Even though there is the method:

"protected void remove(File dir);" (line 1008)

that does exactly that, it is never used. Then the method:

"public void install(String contextPath, URL war);" (line 644)

that implements the "install" operation calls the method:

"protected String expand(URL war);" (line 901)

that expands the provided WAR file and checks if there is already a
directory, under the "webapps" directory, named after the web app to be
installed:

    if (docBase.exists()) {
        // War file is already installed
        return (docBase.getAbsolutePath());
    }

If there is, then it returns without doing anything, which causes the files
in the web app directory not to get updated.


---------------------------------------
Michalis Petropoulos
Ph.D. Student
Computer Science Dept.
University of California, San Diego
p: http://www.cs.ucsd.edu/~mpetropo
e: mpetropo@cs.ucsd.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>