You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by André Warnier <aw...@ice-sa.com> on 2008/11/21 21:19:29 UTC

Where does it find them ?

Hi.

At a customer runs a Tomcat 5.5.9, on Java 1.5, under HPUX 11.11.
It was installed from a standard HPUX package, which install in 
/opt/hpws/tomcat, but otherwise looks pretty much like a plain vanilla 
Tomcat5.x from the official site.
The package comes with a series of sample webapps, apparently installed 
in /opt/hpws/tomcat/webapps.
I have added my own application under there too, and it works.
(Fine is another story, but that's not the crux here).
For various reasons, I wanted to slim down this Tomcat, and for that 
remove the sample applications.
I thus created a backup directory somewhere, stopped Tomcat, and moved 
the following subdir trees totally to this new dir :
../webapps/jsp-examples
../webapps/servlets-examples
../webapps/webdav
(to respectively somewhere_else/webapps-saved/jsp-examples etc..)
then I restarted Tomcat.

Tomcat starts,
and I have this kind of lines in the catalina.out logfile :
...
Nov 21, 2008 11:12:51 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Nov 21, 2008 11:12:51 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 21, 2008 11:12:51 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/33  config=null
Nov 21, 2008 11:12:51 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Nov 21, 2008 11:12:52 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10019 ms
...

So far, so good.
Using the Manager app, I don't see the above apps anymore (but still see 
the ones I left sitting in /webapps, and can use them).
...

But a while later, I discover the following in the Tomcat catalina.out 
logfile :

Nov 21, 2008 11:57:39 AM org.apache.catalina.core.StandardContext stop
INFO: Container 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp-examples] 
has not been started
Nov 21, 2008 11:57:41 AM org.apache.catalina.startup.HostConfig 
checkResources
INFO: Undeploying context [/jsp-examples]
Nov 21, 2008 11:57:48 AM org.apache.catalina.core.StandardContext stop
INFO: Container 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/servlets-examples] 
has not been started
Nov 21, 2008 11:57:48 AM org.apache.catalina.startup.HostConfig 
checkResources
INFO: Undeploying context [/servlets-examples]
Nov 21, 2008 11:58:23 AM org.apache.catalina.core.StandardContext stop
INFO: Container 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/webdav] 
has not been started
Nov 21, 2008 11:58:23 AM org.apache.catalina.startup.HostConfig 
checkResources
INFO: Undeploying context [/webdav]
Nov 21, 2008 12:00:04 PM org.apache.catalina.core.StandardContext stop

Now, my question is, considering these webapps are no longer "there" (in 
mean in the tomcat/webapps directory, where does Tomcat find the 
information about them, to see (apparently) that that they should have 
been there ?

Magic ?

(An accessory question of course is why it takes Tomcat some 40+ minutes 
to figure this out.)




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Where does it find them ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Where does it find them ?
>
> I thus created a backup directory somewhere, stopped Tomcat, and moved
> the following subdir trees totally to this new dir :
> ../webapps/jsp-examples
> ../webapps/servlets-examples
> ../webapps/webdav

You need to clean out Tomcat's work directory, and also any conf/Catalina/[host]/[appName].xml files that pertain to the migrated apps.  Check to make sure that HP didn't throw some <Context> entries into server.xml.

You might want to move up to a more recent level; lots of fixes - including security-related ones - have gone in since 5.5.9.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Where does it find them ?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Re: Where does it find them ?
>
> Now, when you both say "cleanup", you mean "delete", like in
> "rm", right ?

Removing the stuff in the work directory is just cleanup - it's not the cause of the attempted deployment you noticed.  It's just junk (e.g., compiled JSPs) from the webapps you've removed, so there's no need to retain it.

You do need to remove the conf/Catalina/[host]/[appName].xml files, because the mere existence of those is what tells Tomcat to deploy the associated webapps.

> These apps did not come in a war, so what if I wanted to
> re-install them later ?

You can copy them back into webapps, or you can create a conf/Catalina/[host]/[appName].xml file for each, containing a <Context> element with a docBase attribute that points to where you moved them to.

Most of the webapps supplied with Tomcat do not have any <Context> elements associated with them, but you should examine the ones you're deleting to see if they have anything unusual in them (if in doubt, save them and ask).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Where does it find them ?

Posted by Martin Gainty <mg...@hotmail.com>.
Andre

This is the reason why god made laptops so you can try your <TC>configuration on your own working computer
before touching anything from your client..gettin the config to work on your laptop is what a client needs to see and hear

the sysadmin in charge of XYZ machine should have the responsibility of
a)performing any clean up including removing work folders during a TC cycle
b)make sure there are backups of the entire good TC distro (all of $CATALINA_HOME%)
before any config changes as well as ensuring configurations such as JRE_HOME written down *usually in readme.txt*

The work folders belong to Tomcat so by 
rm -rf $CATALINA_HOME/work 
you can rest assured any residual legacy TC files would be cleaned
Also make sure there are NO legacy *.war in $CATALINA_HOME/webapps lingering about that might re-deploy

Just as a carpenter measures twice before cutting think twice and ask these questions before using rm -rf
1)did I make a backup to an acessible location?
2)do I need to remove all of these files?

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Sat, 22 Nov 2008 00:06:02 +0100
> From: aw@ice-sa.com
> To: users@tomcat.apache.org
> Subject: Re: Where does it find them ?
> 
> Martin Gainty wrote:
> > Hi Andre
> > 
> > did you try to clean all folders below $TOMCAT_HOME/work, make sure the wars are not located in webapps (and recycle TC)
> > ?
> > 
> Martin, Chuck,
> 
> No, I did not do that, because I did not know I had to, and since this 
> is a customer's Tomcat and not mine, I didn't want to risk anything that 
> might make the sysadmin unhappy.  He lent me root access and trusts me, 
> I would not want to lose that.
> 
> Now, when you both say "cleanup", you mean "delete", like in "rm", right ?
> These apps did not come in a war, so what if I wanted to re-install them 
> later ? Can I just then re-copy the stuff in /webapps, where it came 
> from, or do I also need to keep copies of what I am going to delete from 
> /work and /catalina/.. ?
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now.
hthttp://clk.atdmt.com/MRT/go/119642558/direct/01/

Re: Where does it find them ?

Posted by André Warnier <aw...@ice-sa.com>.
Martin Gainty wrote:
> Hi Andre
> 
> did you try to clean all folders below $TOMCAT_HOME/work, make sure the wars are not located in webapps (and recycle TC)
> ?
> 
Martin, Chuck,

No, I did not do that, because I did not know I had to, and since this 
is a customer's Tomcat and not mine, I didn't want to risk anything that 
might make the sysadmin unhappy.  He lent me root access and trusts me, 
I would not want to lose that.

Now, when you both say "cleanup", you mean "delete", like in "rm", right ?
These apps did not come in a war, so what if I wanted to re-install them 
later ? Can I just then re-copy the stuff in /webapps, where it came 
from, or do I also need to keep copies of what I am going to delete from 
/work and /catalina/.. ?


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Where does it find them ?

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Andre

did you try to clean all folders below $TOMCAT_HOME/work, make sure the wars are not located in webapps (and recycle TC)
?

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Date: Fri, 21 Nov 2008 21:19:29 +0100
> From: aw@ice-sa.com
> To: users@tomcat.apache.org
> Subject: Where does it find them ?
> 
> Hi.
> 
> At a customer runs a Tomcat 5.5.9, on Java 1.5, under HPUX 11.11.
> It was installed from a standard HPUX package, which install in 
> /opt/hpws/tomcat, but otherwise looks pretty much like a plain vanilla 
> Tomcat5.x from the official site.
> The package comes with a series of sample webapps, apparently installed 
> in /opt/hpws/tomcat/webapps.
> I have added my own application under there too, and it works.
> (Fine is another story, but that's not the crux here).
> For various reasons, I wanted to slim down this Tomcat, and for that 
> remove the sample applications.
> I thus created a backup directory somewhere, stopped Tomcat, and moved 
> the following subdir trees totally to this new dir :
> ../webapps/jsp-examples
> ../webapps/servlets-examples
> ../webapps/webdav
> (to respectively somewhere_else/webapps-saved/jsp-examples etc..)
> then I restarted Tomcat.
> 
> Tomcat starts,
> and I have this kind of lines in the catalina.out logfile :
> ...
> Nov 21, 2008 11:12:51 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8081
> Nov 21, 2008 11:12:51 AM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Nov 21, 2008 11:12:51 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/33  config=null
> Nov 21, 2008 11:12:51 AM org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Nov 21, 2008 11:12:52 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10019 ms
> ...
> 
> So far, so good.
> Using the Manager app, I don't see the above apps anymore (but still see 
> the ones I left sitting in /webapps, and can use them).
> ...
> 
> But a while later, I discover the following in the Tomcat catalina.out 
> logfile :
> 
> Nov 21, 2008 11:57:39 AM org.apache.catalina.core.StandardContext stop
> INFO: Container 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jsp-examples] 
> has not been started
> Nov 21, 2008 11:57:41 AM org.apache.catalina.startup.HostConfig 
> checkResources
> INFO: Undeploying context [/jsp-examples]
> Nov 21, 2008 11:57:48 AM org.apache.catalina.core.StandardContext stop
> INFO: Container 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/servlets-examples] 
> has not been started
> Nov 21, 2008 11:57:48 AM org.apache.catalina.startup.HostConfig 
> checkResources
> INFO: Undeploying context [/servlets-examples]
> Nov 21, 2008 11:58:23 AM org.apache.catalina.core.StandardContext stop
> INFO: Container 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/webdav] 
> has not been started
> Nov 21, 2008 11:58:23 AM org.apache.catalina.startup.HostConfig 
> checkResources
> INFO: Undeploying context [/webdav]
> Nov 21, 2008 12:00:04 PM org.apache.catalina.core.StandardContext stop
> 
> Now, my question is, considering these webapps are no longer "there" (in 
> mean in the tomcat/webapps directory, where does Tomcat find the 
> information about them, to see (apparently) that that they should have 
> been there ?
> 
> Magic ?
> 
> (An accessory question of course is why it takes Tomcat some 40+ minutes 
> to figure this out.)
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Get more done, have more fun, and stay more connected with Windows Mobile®. 
http://clk.atdmt.com/MRT/go/119642556/direct/01/