Document-directory and archive-path
From Resin 3.0
The main directory configuration for a Web Application is the document-directory configuration. The document-directory is the location of any JSP files and static files. Configuration files and classes go in WEB-INF, which is protected from browsers.
Contents |
archive-path
archive-path configures the location of a .war archive for the web-app. archive-path can be convenient when your document-directory is not in a [webapps] directory, but you want to use a .war file.
In the following example, the /foo web-app uses an archive located in /var/www/deploy/foo.war.
resin.conf
... <host id="www.foo.com"> <web-app id="/foo" archive-path="/var/www/deploy/bar.war"> </web-app> </host> ...
Sharing a .war files for multiple web-apps
You can use the archive-path attribute to share a single .war file for multiple web-apps. Just create separate <web-app> entries, each with the archive-path pointing to the same location:
resin.conf
... <host id="www.foo.com"> <web-app id="/a" document-directory="a" archive-path="/var/www/foo.war"> </web-app> <web-app id="/b" document-directory="b" archive-path="/var/www/foo.war"> </web-app> </host> ...