-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 11/22/11 4:03 PM, chris derham wrote:
> So I wasn't 100% sure exactly what to do here. I setup a folder
> under webapps called demos. We put our app there, named ROOT.war.
> Then in another subfolder of webapps called local, we put
> probe.war.

So you'll end up with 4 contexts deployed:

/         -> webapps/demos/ROOT.war
/demos    -> webapps/demos
/local    -> webapps/local
/probe    -> webapps/local/probe.war

> We thought this would allow us to monitor all contexts with a
> single probe install, but it only seems to show a single localhost
> context. I assume that the hosts are separated, and that the
> context="priviliged" setting can allow a web app to access other
> webapps in the same context, but not across hosts.

So... what setting is that?

> Does that explanation make sense, and does that remove your
> concern?

No, you should do this:

1. Move your .war files from out of the webapps directory (and subdirs)
2. Update the paths in ROOT.xml and probe.xml to point to the new
   location
3. Remove the "local" and "demos" directories

Or:
1. Remove the .xml files from conf/[hostname]/*.xml
2. Move your .war files from webapps/*/*.war to webapps/*.war
3. Remove the "local" and "demos" directories

While you have disabled auto-deploy, it would be surprising to see
webapps and directories stuck under the webapps/ tree that weren't
being auto-deployed. It's better to put them somewhere else. It also
makes Tomcat upgrades easier, since you won't have to move WAR files
or remember that you changed things from the default.

> The only idea I have left if nobody can see an obvious flaw in our
> logic is to write some custom code to initialise log4j. We would
> just need to pick up the context, or a jndi variable and then
> prefix the log file name with this. Guess it can't be that hard -
> just figured that somebody would have hit this before.

I think that's your best bet.

> I recall that Mark Thomas mentioned something in a recent response
> about looking for some code in tomcat source where it allowed
> different contexts to register with JMX using different ports. I
> looked and can't find it - always hard to google for something if
> you don't know the term. Can anyone provide a pointer to if there
> is an existing variable containing a context id, or path, or name
> or something unique that we could use to prefix the log file - or
> is it just easier to setup our own context parameter?

I'm not sure that using JMX is going to make your life any easier.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7MJcgACgkQ9CaO5/Lv0PDDpACdEJ+Kf/9pxVdpMLdeM0OxqIXB
72gAn1BhRTpS0Pd+yXeyDYefWN+Rkwdn
=i6Zk
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to