<document>
<header>
<product>resin</product>
<title>Environment: Class Loaders, Resources and JNDI</title>
<version>Resin 3.0</version>

<description>
<p>Resin organizes resources and classloaders into nested environments.
Each environment context merges its own configuration with configuration
inherited from the parent environment.  Each environment context: server,
host, web-app, etc. may be configured with any of the environment
configuration tags.
</p>
</description>
</header>

<body>

<localtoc/>

<s1 title="Classloaders">
<s2 title="class-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.loader.DynamicLoader -->

<p>Adds dynamic classloaders to the current environment.</p>

<p>Each environment (&lt;server&gt;, &lt;host&gt;, &lt;web-app&gt;) etc,
can add dynamic classloaders.  The environment will inherit the parent
classloaders.  Each &lt;class-loader&gt; is comprised of several implementing
loader items: library-loader for WEB-INF/lib, compiling-loader for
WEB-INF/classes, even make-loader for more complex auto-compilation.</p>

<example title="&lt;class-loader> in resin-web.xml">
&lt;web-app xmlns="http://caucho.com/ns/resin"&gt;
  &lt;prologue>
    &lt;class-loader&gt;
      &lt;compiling-loader path="WEB-INF/classes"/&gt;

      &lt;library-loader path="WEB-INF/lib"/&gt;
    &lt;/class-loader&gt;
  &lt;/prologue>
&lt;/web-app&gt;
</example>

</s2>

<s2 title="compiling-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>
  <!-- com.caucho.loader.CompilingLoader -->

<p>Configures an auto-compiling <var>WEB-INF/classes</var>-style class loader.</p>

<p>The compiling-loader will automatically compile Java code into .class
files loading them.</p>

<deftable-childtags>
<tr><td>args</td><td>Additional arguments to be passed to the Java compiler. Resin 3.0</td><td>none
</td></tr><tr><td>batch</td><td>If true, multiple changed *.java files will be compiled in a single batch. Resin 3.0.7</td><td>true
</td></tr><tr><td>encoding</td><td>I18N encoding for the Java compiler. Since Resin 3.0</td><td>none
</td></tr><tr><td>path</td><td>Filesystem path for the class loader.  Since Resin 3.0</td><td>required
</td></tr><tr><td>source</td><td>Java source directory. Since Resin 3.0</td><td>value of path
</td></tr><tr><td>require-source</td><td>If true, .class files without matching .java files will be deleted. Since Resin 3.0</td><td>false
</td></tr></deftable-childtags>

</s2>

<s2 title="library-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>

<p>Configures a jar library, <var>WEB-INF/lib</var>-style class loader.</p>

<p>The library-loader will add jar files in its path to the current classpath.
Jar files are recognized wihen they have a filename extension of
<code>.jar</code> or <code>.zip</code>.</p>

<deftable-childtags>
<tr><td>path</td><td>Filesystem path for the class loader.  Since Resin 3.0</td><td>required
</td></tr></deftable-childtags>

<p>See <a href="javadoc|com.caucho.loader.DirectoryLoader|"/>.</p>
</s2>

<s2 title="tree-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>
  <!-- com.caucho.loader.TreeLoader -->

<p>Configures a jar library, <var>WEB-INF/lib</var>-style class loader similar to
<a config-tag="library-loader"/>, but will also find <code>.jar</code> and
<code>.zip</code> files in subdirectories.</p>

<deftable-childtags>
<tr><td>path</td><td>Filesystem path for the class loader.  Since Resin 3.0</td><td>required
</td></tr></deftable-childtags>

<p>See <a href="javadoc|com.caucho.loader.TreeLoader|"/>.</p>
</s2>

<s2 title="make-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>
  <!-- com.caucho.loader.MakeLoader -->

<p>Configures a custom make-style loader.</p>
</s2>

<s2 title="servlet-hack" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>

<p>Use of servlet-hack is discouraged.  Using servlet-hack violates
the JDK's classloader delegation model and can
produce surprising ClassCastExceptions.</p>

<p>servlet-hack reverses the normal class loader order.
Instead of parent classloaders having priority, child classloaders
have priority.</p>

</s2>

<s2 title="simple-loader" occur="*" version="Resin 3.0" type="defun">
  <parents>class-loader</parents>
  <!-- com.caucho.loader.SimpleLoader -->

<p>Configures a simple <var>classes</var>-style class loader.</p>

<p>.class files in the specified directory will be loaded without any
special compilation steps (in contrast with compiling-loader.)</p>

<deftable-childtags>
<tr><td>path</td><td>Filesystem path for the class loader.  Since Resin 3.0</td><td>required
</td></tr><tr><td>prefix</td><td>Class package prefix to only load to a subset of classes. Resin 3.0</td><td>none
</td></tr></deftable-childtags>

</s2>

</s1>

<s1 title="Clustering">
<s2 title="cluster" occur="?" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.server.cluster.Cluster -->

<p>Configures a cluster of Resin servers for load balancing and sharing
state information.</p>

<p>Each cluster is a collection of Resin servers.
The servers will share session information if the sessions are configured
for &lt;cluster-store&gt;.</p>

<p>Each environment context is associated with a single cluster.  If no
cluster is defined for the context, it defaults to the parent cluster.</p>

<p>Normally, the cluster will be configured in the &lt;server&gt; context,
although a cluster could be defined in a web-app for finer load-balancing.
Only clusters defined in the &lt;server&gt; context are used for listening
to ports.  Other clusters are only for outgoing load balancing.</p>

<deftable-childtags>
<tr><td>id</td><td>identifies the cluster for later reference.  Since Resin 3.0</td><td>none
</td></tr><tr><td>srun</td><td>configures the srun port and protocol for a cluster server. Since Resin 3.0</td><td>none
</td></tr><tr><td>cluster-group</td><td>specialized configuration for sub-clusters. Since Resin 3.0</td><td>none
</td></tr><tr><td>cluster-ref</td><td>an identifier for a previous cluster-definition to use for the cluster.  Since Resin 3.0</td><td>none
</td></tr></deftable-childtags>

<example>
&lt;resin xmlns="http://caucho.com/ns/resin"&gt;
&lt;server&gt;
  &lt;cluster&gt;
    &lt;srun id='a' port='6810'/&gt;
    &lt;srun id='b' port='6811'/&gt;
  &lt;/cluster&gt;
  ...
</example>
</s2>

<s2 title="cluster-definition" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.server.cluster.ClusterDef -->

<p>Defines a cluster for later use by cluster-ref.</p>

<deftable-childtags>
<tr><td>id</td><td>identifies the cluster for later reference.  Since Resin 3.0</td><td>required
</td></tr><tr><td>srun</td><td>configures the srun port and protocol for a cluster server. Since Resin 3.0</td><td>none
</td></tr><tr><td>cluster-group</td><td>specialized configuration for sub-clusters. Since Resin 3.0</td><td>none
</td></tr></deftable-childtags>

</s2>
</s1>

<s1 title="Resources">

<s2 title="connector" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.jca.ConnectorResource -->

<p>Configures a JCA resource adapter and its
associated connection factories.</p>

<p>The resource adapter/connector  will have been added as a rar
file (see <a href="#resource-deploy">resource-deploy</a>.  The
&lt;connector&gt; configures that rar resource.</p>

<example title="Connector Example">
&lt;connector connector-name="Test Resource"&gt;
  &lt;connection-factory jndi-name="eis/test"&gt;
    &lt;init&gt;
      &lt;value&gt;b&lt;/value&gt;
    &lt;/init&gt;
  &lt;/connection-factory&gt;
&lt;/connector&gt;
</example>

<deftable-childtags>
<tr><td>connector</td><td>Configures a connector</td><td>required
</td></tr><tr><td>connector-name</td><td>Specifies the rar connector's display-name</td><td>required
</td></tr><tr><td>resource-adapter</td><td>Configures the resource-adapter</td><td>optional
</td></tr><tr><td>connection-factory</td><td>Configures a connection-factory</td><td>optional
</td></tr><tr><td>jndi-name</td><td>JNDI name for a resource-adapter or connection-factory</td><td>required
</td></tr><tr><td>type</td><td>For connectors with multiple connection-factories, specifies the connection-factory</td><td>optional
</td></tr><tr><td>local-transaction-optimization</td><td>Enables the local transaction optimization. Resin 3.0.7</td><td>true
</td></tr><tr><td>init</td><td>Bean-style initialization</td><td>optional
</td></tr></deftable-childtags>

<def title="connector schema">
element connector {
  connector-name { string }

  &amp; resource-adapter?

  &amp; connection-factory*
}

element connection-factory {
  jndi-name,

  type?,

  element init { any }?
}

element resource-adapter {
  jndi-name,

  element init { any }?
}
</def>

</s2>

<s2 title="database" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.sql.DBPool -->

<p>Defines a database resource.</p>

<p>The <a href="config-database.xtp">database configuration</a> section has
more details on the configuration.  A code pattern for using databases
is in a <a href="examples|db-jdbc/index.xtp">DataSource tutorial.</a></p>

<example>
&lt;database jndi-name='jdbc/test_mysql'&gt;
  &lt;driver 
    type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"&gt;
    &lt;url&gt;jdbc:mysql://localhost:3306/test&lt;/url&gt;
    &lt;user&gt;&lt;/user&gt;
    &lt;password&gt;&lt;/password&gt;
  &lt;/driver&gt;
&lt;/database&gt;
</example>

</s2>

<s2 title="ejb-server" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.ejb.EJBServer -->

<p>Configures an EJB/CMP server.  See the CMP configuration for more details.</p>
</s2>

<s2 title="env-entry" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.config.types.EnvEntry -->

<p>Configures a JNDI scalar value for JNDI-based application configuration.</p>

<p>Some application beans prefer to retrieve configuration data from JNDI,
including String, Integer, and Double constants.  env-entry configures
that data in the current context.  As with other Resin configuration, the
value can use JSP-EL expressions.</p>

<deftable-childtags>
<tr><td>env-entry-name</td><td>JNDI name to store the value.  Since Servlet 2.1</td><td>required
</td></tr><tr><td>env-entry-type</td><td>Java type for the value.  Since Servlet 2.1</td><td>required
</td></tr><tr><td>env-entry-value</td><td>Value to be stored.  Since Servlet 2.1</td><td>required
</td></tr></deftable-childtags>

<p>The example configuration stores a string in java:comp/env/greeting.
Following the J2EE spec, the env-entry-name is relative to
java:comp/env.  If the env-entry is in the &lt;host&gt; context, it will
be visible to all web-apps in the host.</p>

<example title="Example resin.xml fragment">
&lt;env-entry&gt;
  &lt;env-entry-name&gt;greeting&lt;/env-entry-name&gt;
  &lt;env-entry-type&gt;java.lang.String&lt;/env-entry-type&gt;
  &lt;env-entry-value&gt;Hello, World&lt;/env-entry-value&gt;
&lt;/env-entry&gt;
</example>

<p>The following servlet fragment is a typical use in a servlet.  The
servlet only looks up the variable once and stores it for later use.
</p>

<example title="GreetingServlet.java">
import java.io.*;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class TestServlet extends HttpServlet {
  private String greeting;

  public void init()
    throws ServletException
  {
    try {
      Context env = 
        (Context) new InitialContext().lookup("java:comp/env");
      greeting = (String) env.lookup("greeting");
    } catch (NamingException e) {
      throw new ServletException(e);
    }
  }

  ...
}
</example>

<def title="env-entry schema">
element env-entry {
  (attribute env-entry-name { string } | 
   element env-entry-name { string }),

  (attribute env-entry-type { string } | 
   element env-entry-type { string }),

  (attribute env-entry-value { string } | 
   element env-entry-value { string })
}
</def>

</s2>
  
<s2 title="jndi-link" occur="*" version="Resin 1.2" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.naming.LinkProxy -->

<p>Links a foreign JNDI contexts or JNDI object.</p>

<p>Resin's JNDI can link to foreign JNDI contexts.  For example, third-party
EJB servers will often expose their EJB beans through a JNDI context.
jndi-link will create the appropriate InitialContextFactory, configure it,
and lookup the foreign JNDI objects.</p>

<deftable-childtags>
<tr><td>jndi-name</td><td>The JNDI name where the foreign context should be linked.  Resin 3.0</td><td>required
</td></tr><tr><td>factory</td><td>Class name of the JNDI InitialContextFactory.  Since Resin 1.2</td><td>optional
</td></tr><tr><td>foreign-name</td><td>Sub-context of the foreign JNDI context.  Since Resin 1.2</td><td>none
</td></tr><tr><td>init-param</td><td>Configuration parameters for the JNDI environment passed to InitialContextFactory.  Since Resin 1.2</td><td>none
</td></tr></deftable-childtags>

<example title="Linking a WebLogic EJB client bean">
&lt;jndi-link&gt;
  &lt;jndi-name&gt;java:comp/env/ejb/traderHome&lt;/jndi-name&gt;
  &lt;factory&gt;weblogic.jndi.WLInitialContextFactory&lt;/factory&gt;
  &lt;init-param java.naming.provider.url="t3://localhost:7001"/&gt;
  &lt;foreign-name&gt;statelessSession/TraderHome&lt;/foreign-name&gt;
&lt;/jndi-link&gt;
</example>

<example title="A JNDI symbolic link EJB client bean">
&lt;jndi-link&gt;
  &lt;jndi-name&gt;java:comp/env/ejb/MyBean&lt;/jndi-name&gt;
  &lt;foreign-name&gt;/SampleBean&lt;/foreign-name&gt;
&lt;/jndi-link&gt;
</example>

</s2>

<s2 title="reference" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.config.types.ReferenceConfig -->

<p>Configures a JNDI ObjectFactory.</p>

<p>JNDI ObjectFactories are used to create objects from JNDI references.
The &lt;reference&gt; tag configures the ObjectFactory and stores it in JNDI.</p>

<deftable-childtags>
<tr><td>jndi-name</td><td>JNDI name for the reference.  Since Resin 3.0</td><td>required
</td></tr><tr><td>factory</td><td>Class name of the ObjectFactory. Resin 3.0</td><td>required
</td></tr><tr><td>init</td><td>Bean-style initialization for the factory</td><td>none
</td></tr></deftable-childtags>

<example>
&lt;reference&gt;
  &lt;jndi-name&gt;hessian/hello&lt;/jndi-name&gt;
  &lt;factory&gt;com.caucho.hessian.client.HessianProxyFactory&lt;/factory&gt;
  &lt;init url="http://localhost:8080/ejb/hello"/&gt;
        type="test.HelloHome"/&gt;
&lt;/reference&gt;
</example>

</s2>

<s2 title="resource" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.config.types.Resource -->

<p>Configures a custom bean resource and stores in JNDI.</p>

<p>Resources are beans stored in JNDI.  The resources can be
created from any Java class that conforms to the bean conventions.
Configuration of the resource is in the &lt;init&gt; section.  Field values may
use JSP-EL expressions as well as constant strings or even complex
sub-beans.</p>

<deftable-childtags>
<tr><td>jndi-name</td><td>JNDI name for the resource.  Since Resin 3.0</td><td>required
</td></tr><tr><td>type</td><td>Bean class implementing the resource. Since Resin 3.0</td><td>required
</td></tr><tr><td>arg</td><td>Arguments to the resource's constructor.  Since Resin 3.0</td><td>optional
</td></tr><tr><td>mbean-name</td><td>JMX name for management registration. Resin 3.0</td><td>optional
</td></tr><tr><td>init</td><td>Bean-style initialization for the bean</td><td>optional
</td></tr><tr><td>listener</td><td>Registers the bean as a listener for a JMX emitter. Resin 3.0</td><td>optional
</td></tr><tr><td>local-transaction-optimization</td><td>Enables the local transaction optimization. Resin 3.0.7</td><td>true
</td></tr></deftable-childtags>

<example>
&lt;resource jndi-name="env/test"&gt;
  &lt;type&gt;test.MyBean&lt;/type&gt;
  &lt;init&gt;
    &lt;greeting&gt;Hello&lt;/greeting&gt;
    &lt;server&gt;${'${'}serverId}&lt;/server&gt;
    &lt;sub-bean&gt;
      &lt;value&gt;${'${2'} + 2}&lt;/value&gt;
    &lt;/sub-bean&gt;
  &lt;/init&gt;
&lt;/resource&gt;
</example>

<def title="schema">
r_listener-Resource = element listener {
  r_mbean-name,

  r_handback*
}

r_resource = element resource {
  (r_jndi-name?

  &amp; r_mbean-name?

  &amp; r_mbean-interface?),

  (r_type,

  r_arg*)?,

  (r_init*

  &amp; r_listener-Resource*)
}
</def>

</s2> 

<s2 title="resource-deploy" occur="*" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.jca.ResourceDeploy -->

<p>Defines a deployment directory for .rar files.</p>

<p>Connectors and resources defined in .rar files must be deployed
before they can be configured by <a href="#connector">connector</a>.
The &lt;resource-deploy&gt; tag specifies the directory for that deployment.
</p>

<example title="example resource-deploy">
&lt;host&gt;
  &lt;resource-deploy path="deploy"/&gt;

  ...
&lt;/host&gt;
</example>

<deftable-childtags>
<tr><td>resource-deploy</td><td>Configures .rar deployment</td><td>required
</td></tr><tr><td>path</td><td>Configures the path where users will place .rar files</td><td>required
</td></tr><tr><td>expand-path</td><td>Configures the directory where Resin will expand rar files</td><td>the path value
</td></tr></deftable-childtags>

<def title="schema">
element resource-deploy {
  (attribute path { string } | element path { string })

  &amp; (attribute expand-path { string } | 
         element expand-path { string })?
}
</def>

</s2>

<s2 title="resource-ref" occur="*" version="Servlet 2.2" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.config.types.ResourceRef -->

<p>Declares that the application needs a resouce configuration.</p>

<p>resource-ref is not directly used by Resin.  It's a servlet configuration
item intended to tell GUI tools which resources need configuration.
Resource configuration in Resin uses the resource, reference,
database, and ejb-server tags.</p>

<p>For backwards compatibility, Resin 2.1-style configuration files
may still use resource-ref to configure resources, but it's recommended to
convert the configuration.</p>

</s2>
</s1>

<s1 title="Logging">
<s2 title="log" occur="*" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>

<p>Configures JDK 1.4 java.util.logger logging.</p>

<p>The <a href="config-log.xtp">log configuration</a> describes
log in detail.</p>

</s2>

<s2 title="stderr-log" occur="?" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>

<p>Configures the destination for <code>System.err</code>.</p>

<p>The <a href="config-log.xtp">log configuration</a> describes
stderr-log in detail.</p>

</s2>

<s2 title="stdout-log" occur="?" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>

<p>Configures the destination for <code>System.out</code>.</p>

<p>The <a href="config-log.xtp">log configuration</a> describes
stderr-log in detail.</p>
</s2>
</s1>

<s1 title="Authenticator">
<s2 title="authenticator" occur="*" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app, login-config</parents>
  <!-- com.caucho.config.types.Authenticator -->

<p>Configures an authentication resource for the current context.</p>

<p>Resin's servlet authentication uses an authentication resource to
validate user login and to provide single-signon capability.
The authenticator is configured in the environment context
where it is shared.  So an authenticator configured in the web-app
only applies to the web-app, but an authenticator configured in
the host will apply to all hosts.</p>

<p>The authenticator class is selected with the <var>type</var> attribute.  It
can be any custom class
extending <code>com.caucho.server.security.AbstractAuthenticator</code>.
Configuration of the authenticator uses bean-style configuration in the
&lt;init&gt; tag.</p>

<deftable-childtags>
<tr><td>jndi-name</td><td>The JNDI name where the authenticator is stored.  Since Resin 3.0</td><td>java:comp/env/caucho/auth
</td></tr><tr><td>type</td><td>The implementing class for the authenticator.  Since Resin 3.0</td><td>required
</td></tr><tr><td>init</td><td>A bean-style configuration section.  Since Resin 3.0</td><td>none
</td></tr></deftable-childtags>

</s2>
</s1>

<s1 title="Miscellaneous">
<s2 title="system-property" occur="*" version="Resin 2.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>

<p>Sets a Java system property.  The effect is the same as if you
had called <a href="javadoc|java.lang.System|setProperty(String,String)"/> before starting Resin.</p>

<example>
&lt;resin&gt;
  &lt;system-property foo="bar"/&gt;
&lt;/resin&gt;
</example>
</s2>

<s2 title="javac" occur="?" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
  <!-- com.caucho.java.JavacConfig -->

<p>Configures the Java compiler for automatically compiled files.</p>

<p>The javac configuration is used for JSP, XSL, EJB and
compiling-loader configuration.</p>

<deftable-childtags>
<tr><td>compiler</td><td>Configures the Java compiler to use.  Since Resin 3.0</td><td>internal
</td></tr><tr><td>args</td><td>Any additional arguments for the compiler.  Since Resin 3.0</td><td>none
</td></tr><tr><td>encoding</td><td>Any encoding valued for the compiler.  Since Resin 3.0</td><td>none
</td></tr></deftable-childtags>

</s2>

<s2 title="dependency" occur="?" version="Resin 3.0.1" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>

<p>Configures a path as a file which should force a reload when changed,
like web.xml and resin.xml.</p>

<deftable-childtags>
<tr><td>path</td><td>Filesystem path to the dependent file.  Since Resin 3.0</td><td>required
</td></tr></deftable-childtags>

<example title="web.xml">
&lt;web-app xmlns="http://caucho.com/ns/resin"&gt;
  &lt;dependency path="WEB-INF/struts-config.xml"/&gt;
  ...
&lt;/web-app&gt;
</example>

</s2>

<s2 title="dependency-check-interval" occur="?" version="Resin 3.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
<default>2s</default>

<p>Configures how often the environment context
should be checked for changes.</p>

<p>Resin automatically checks each environment for updates, generally
class or configuration updates.  Because these checks can take a considerable
amount of time, deployment servers should use high values like 60s or more while development machines will want low values like 2s.</p>

<p>The interval defaults to the parent's interval.  So the web-app will
default to the host's value.</p>
</s2>

<s2 title="character-encoding" occur="?" version="Resin 1.1" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
<default>The default value is ISO-8859-1.</default>

<p>Specifies the default character encoding for the environment.</p>


<example>
&lt;web-app id='/'&gt;
  &lt;character-encoding&gt;shift_jis&lt;/character-encoding&gt;
  ...

&lt;/web-app&gt;
</example>
</s2>

<s2 title="case-insensitive" occur="?" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
<default>true on Windows, false on Unix.</default>

<p>Specifies whether the environment context is case sensitive or insensitive.</p>

<p>Because some operating systems are case-insensitive, it is important
for security reasons for Resin to behave differently for case-sensitive
and case-insensitive directories.  For example, when case-insensitive
is true, url-patterns will match in a case-insensitive manner, so TEST.JSP
will work like test.jsp.</p>

</s2>
<s2 title="temp-dir" occur="?" version="Resin 1.1" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
<default>Defaults to <var>WEB-INF/tmp</var></default>

<p>Application temp directory.  This is the path used in
<var>javax.servlet.context.tempdir</var>.</p>
</s2>

<s2 title="work-dir" occur="?" version="Resin 2.0.0" type="defun">
<parents>resin, server, host-default, host, web-app-default, web-app</parents>
<default>Defaults to <var>WEB-INF/work</var></default>

<p>Application work directory.  This is the directory used for
generated code like JSP, XSL and EJB classes.</p>
</s2>
</s1>

</body>
</document>