RESIN_HOME is the directory containing the Resin binaries and classes. In the default configuration, RESIN_HOME will be the same as SERVER_ROOT, i.e. the document directories and log files are based on RESIN_HOME. A typical location for RESIN_HOME might be /usr/local/resin. RESIN_HOME is controlled by the command-line and system environment when Resin starts. The heuristic for selecting RESIN_HOME is
The Resin binary will set the Java system property resin.home to the value for RESIN_HOME, e.g. by setting -Dresin.home=$RESIN_HOME. If an application starts the Resin main class directly, it should set the resin. home system property.
SERVER_ROOT is the directory containing the user's configuration, documents, and log files. By default, SERVER_ROOT is the same as RESIN_HOME, but sophisticated users will create a separate directory from the Resin binaries. For example, an ISP might have a separate SERVER_ROOT for each user's JVM. A typical location for SERVER_ROOT might be /usr/local/webroot. SERVER_ROOT is controlled by the command-line when Resin starts. The heuristic for selecting SERVER_ROOT is:
Each virtual host has its own root directory. The root directory contains virtual host's documents, war directory, and logs. The virtual host's directory is configured in the resin.conf. root-dir configures the virtual host's root. doc-dir configures the virtual host's document directory.
The webapps directory automatically expands .war and .ear files. Each .war file will be expanded into a web-app as a directory under the webapps directory. webapps/foo.war will expand into webapps/foo. /foo will then be a web-app for the virtual host. So the URL might be http://www.bar.com/foo. Each .ear file will expand its jars and .war files. The jars will go into webapps/WEB-INF/lib. The .wars will be expanded into webapps. The resin.conf configures the webapps directory with the war-dir configuration.
.war fileA .war file is a packaged Servlet application. It's just a renamed .jar file of the web-app directory tree. Resin provides a special webapps directory which will automatically expand .war files, configured by the war-dir attribute in the resin.conf's host configuration. Placing a foo.war in webapps/foo.war will prompt Resin to expand foo.war into webapps/foo/*. Resin will automatically create a new application browsable at the URL http://localhost:8080/foo You can also use the < war-dir> for development. Just creating a webapps/bar directory will create an application browsable at http://localhost:8080/bar. A small warning, though, any bar.war placed in webapps will delete and replace your webapps/bar directory. The special .war file ROOT.war can be used to configure the 'root' web-app, i.e. the web-app with no context path. webapps/ROOT is browsed with http://localhost:8080. Resin always handles all files in a war, even when Resin is used with another webserver like Apache.
Each web application has its own document directory. The files in that directory are served as static file. The WEB-INF subdirectory contains classes and configuration files for the web-app. Web applications are either configured implicitly by the webapps directory or explicitly in the resin.conf. Any .war files in the webapps directory will create a web application. will expand into the web-app directory . The WEB-INF directory is in .Web applicatoins configured in the resin.conf can be placed anywhere in the filesystem using the tag.
The web-apps can also be configured using regular expressions. For example, may translate into a web-app in /home/ferg/public_html.
The WEB-INF contains the classes, jars, and configuration files for the web application. WEB-INF is at the root of the web-app's document directory.
WEB-INF for hosts and http-serverHosts and the http-server may also have a WEB-INF directory. The host's WEB-INF will be shared for all web-apps in the virtual host. The http-server's WEB-INF will be shared for all virtual hosts in the server. The host's WEB-INF directory is in webapps/WEB-INF. The http-server's WEB-INF is in SERVER_ROOT/WEB-INF. Sites will typically use the host's WEB-INF to share resources, EJB servers, or single-signon authenticators for all applications in a host or in the server.
In the web.xml file, directories and files can be aliased using the path-mapping directive.
Paths in configuration variables can use path and regular expression variables.
|