Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat-6: Per-virtual-host environment stuff?

 
Andrei Hager
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to make a simple string (path to an important file) available to all webapps on a given virtual-host via server.xml. Here's an example of what does NOT work, but comes close:



The problem is that The "default context" only applies to stuff in the ROOT folder, but not any other webapps. What I really want is to be able to set an <Environment> value (or something equivalent) which is visible by all webapps under the <Host>.

Any suggestions?
 
Andrei Hager
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer: You can do a per-host context by putting XML in:

$CATALINA_HOME/conf/EngineName/HostName/context.xml.default

e.g.

/usr/share/tomcat6/conf/Catalina/www.example.com/context.xml.default

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic