tags:

views:

378

answers:

3

I have machine with an installed tomcat 5.5 it serves various application from the default appbase.

I also have a bunch of directories which should get turned into WEBDAV applications, by configuring the common root as appbase, which of course is completely different from the appbase mentioned above

Neither of the directories should move.

So, is there a way to have a second appbase?

A: 

No but you can create links on the file system to have all directories appear in the same place.

Note that links on NTFS are possible but a bit fragile (which is probably why no one uses them on Windows while Unix users use this powerful feature all the time).

Aaron Digulla
+1  A: 

You can do it with a multiple virtual HOSTs. A related question.

Mark
Would I need multiple DNS entries for that? If so that would be problematic
Jens Schauder
+1  A: 

You can't have multiple appbase but there are multiple ways to get around this issue.

  1. If you have an Apache front-end, you can make multiple hosts look like one by mapping the URLs.
  2. You can create symlink in the appBase.
  3. You can use context fragment so the docBase can be pointed to anywhere, effectively having multiple appBase.

To use context fragment, you need to place a xml file in conf/Catalina/[host] directory. The file should contain something like this,

<Context docBase="/appbase2/app">
</Context>

The xml file name will be the context/app name.

ZZ Coder
no apache and windows, but the 3rd one looks promising. I'll try that
Jens Schauder
Worked like a charm.
Jens Schauder