Problem removing web applications

I've noticed when going through the process of deploying and undeploying the same web application multiple times that the web server does not completely "clean up" the previous versions.

Specifically, JARs included in the WAR that was deployed are not removed from the web server. This causes the deployed path for the latest version of the web application to become ../web-app/<virtual_server_name>/<application_name>_X where X is the current number of times it's been redeployed.

How do I get the web server to clean up these old unwanted directories when a web application is removed?

[620 byte] By [Chip_Da] at [2007-11-27 9:11:36]
# 1
Which version of web server are you using?Is it 6.1 or 7.0?
kmeduria at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 2
I'm using version 7.0 on Windows XP.
Chip_Da at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 3

On WS7, You should be using wadm in WS7_INSTALLATION_DIR/bin.

The commands to deploy an app are:

wadm add-webapp

wadm deploy-config

The commands to undeploy an app are:

wadm remove-webapp

wadm deploy-config

You need to create password file that should have the following entry:

wadm_password=<your admin server administrator password>

and you need to use this for --password-file argument.

Are you doing all this correctly?

Alternatively, you could use administration GUI. See the following blog entry

http://blogs.sun.com/kmeduri/entry/how_to_deploy_a_war

If you are using the above to deploy and undeploy the app and still see the problem, I can help you.

I just tried it and I don't see such problem.

kmeduria at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 4
You need to to start the admin server for wadm commands to work.
kmeduria at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 5

Yes, I believe I'm doing everything correctly. The problem exists whether or not I use wadm on the command line or the admin console interface. The only "non-standard" thing that I'm doing is enabling pre-compilation of JSPs.

It almost seems like a file permissions problem, but I don't see anything in the error logs to indicate this.

Chip_Da at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 6
Did you ever perform a pull-config on the same configuration?
123javahardcorea at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 7
And if you're using the GUI, then did you do a 'pull & deploy config' during a deploy (after adding the web application)?
123javahardcorea at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 8
No, I never did a pull & deploy config, just deploy config.
Chip_Da at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 9

Chip_D:

I did repeat ing the deploy/undeploy with a simple webapp (jsps). But I can't reproduce the case. (I am using 7.0U1). As I know , in Windows if any access is active for those webapp directory, the admin server will not be able to delete the directory/files.Did you check if any window/explore open for those webapp directory(ies) during undeployment operation?

wyb2005a at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 10
No explorer windows are open for the webapp directory in question. Something else must be preventing the directories from being automatically removed.
Chip_Da at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...
# 11
I am running version 7.0U1 also.
Chip_Da at 2007-7-12 21:57:19 > top of Java-index,Web & Directory Servers,Web Servers...