caucho
Resin
FAQ
Reference Guide
Demo
Tutorial

Getting Started
Configuration
IDE
Topics
JSP
XML/XSLT

Basic Config
Directory
Servlets
Filters
Resources
Databases
Messaging
Security Config
Log Config
Taglib Config
Misc resin.conf
Host resin.conf
Port resin.conf
App resin.conf
Summary
Glossary
Index
 Miscellaneous Resin Configuration

Taglib Config
Configuration
Host resin.conf

This section contains general, i.e. non-HTTP, configuration. resin.conf is a general configuration file, like NT's registry. Some Resin modules like logging have their configuration in resin.conf, but outside the http-server block.

Configuration is based on element XML. The canonical form uses elements only, like the Servlet 2.2 deployment descriptors. To make the configuration more readable, you can use an attribute as syntactic sugar for an element.

The following are equivalent:

<foo><bar>13</bar></foo>canonical representation, but verbose
<foo bar=13/>typical configuration
<foo><bar id=13/></foo>Useful for a key-based list.

In general, the order is not important, but the nesting depth is. In this reference guide, caucho.com/http-server/http/port refers to a configuration like:

<caucho.com>
  <http-server>
    <http>
      <port>80</port>
    </http>
  </http-server>
</caucho.com>

That example could be rewritten as:

<caucho.com>
  <http-server>
    <http port='80'/>
  </http-server>
</caucho.com>

Index
group-nameSets the Unix group
http-serverhttpd and srun configuration
javaConfiguration for the Java compiler
logDebug log configuration
resin:includeIncludes another configuration file
resin:include-directoryIncludes files in a directory
security-managerEnables the a Java security manager
security-providerAdds a Java security provider without modifying the java
smtp.vfsVFS mailto: configuration
system-propertySets a Java system property
user-nameSets Unix user

caucho.com

resin:include

Includes another configuration file.

<caucho.com>
<http-server>
  <host id='host1'>
    <resin:include href='host.conf'/>
  </host>
  <host id='host2'>
    <resin:include href='host.conf'/>
  </host>
</http-server>
</caucho.com>

resin:include-directory

Includes files in a directory. All the files in the directory named by the href and which have the given extension will be inserted into the XML document.

<caucho.com>
<http-server>
  <host id='host1'>
    <resin:include-directory sub='host.conf' extension='.xml'/>
  </host>
</http-server>
</caucho.com>

java

Configuration for the Java compiler. In general, we recommend using IBM's jikes compiler because it's significantly faster than the "internal" compiler.

AttributeMeaningDefault
classpathextra classpath (Resin 1.2.3)none
compilerPath to the java compiler or "internal"internal
compiler-argsExtra args to pass to the compilernone
encodingCharacter encoding (Resin 1.2.4)none
max-compile-timeLimits the time for a Java compilation (Resin 1.2.3)30 sec

<caucho.com>
  <java compiler='/usr/local/bin/jikes'
         compiler-args='-g'/>
  ...
</caucho.com>

The "internal" compiler is the default only because it's always available for any JDK. The external jikes compiler is generally a preferred configuration.

log

Debug log configuration. Most of Resin's code has debug logging built in. The <log> configuration enables that logging, allowing users to see what's going on. The debug logging can be useful when trying to understand what HTTP requests and headers the browser is sending or Resin is returning.

AttributeMeaningdefault
idName of debugging sectionnone
hrefDestination filenone
timestamptimestamp formatnone
rollover-counthow many rotated (href.n) logs to keep.2
rollover-periodHow often to rotate the log.none

For example, to log everything to standard error use:

<caucho.com>
  <log id='/' href='stderr:' timestamp="[%H:%M:%S.%s]"/>
</caucho.com>

log id valueMeaning
/Debug everything
/caucho.com/jspDebug jsp
/caucho.com/javaSee all Java compilation
/caucho.com/xslXSL debugging
/caucho.com/tcp-server See thread creation and deletion
/caucho.com/sql See database pooling
/caucho.com/http HTTP related information
/caucho.com/http/session HTTP sessions
/caucho.com/distribution Distributed and persistent sessions
/caucho.com/http/cache Resin's proxy cache

The timestamp can include the following patterns:

PatternMeaning
%ashort weekday (mon, tue, ...)
%Along weekday (Monday, Tuesday, ...)
%bshort month (Jan, Feb, ...)
%Blong month (January, February, ...)
%clocale specific date
%dday of month
%H24-hour
%I12-hour
%jday of year
%mmonth
%Mminute
%pam/pm
%Sseconds
%smilliseconds
%Wweek of year
%wday of week
%y2-digit year
%Y4-digit year

smtp.vfs

VFS mailto: configuration. The smtp.vfs configuration only applies to the mailto: scheme in Resin's VFS. See the form mailing tutorial.

AttributeMeaningDefault
hostSMTP hostlocalhost
portSMTP port25
sendersending mail addressThe current user and local host

http-server

httpd and srun configuration.

Configures both http and srun. The configuration is identical.

group-name

Sets the Unix group. To listen to port 80, Unix systems require Resin to start as root. group-name lets the server change to a safer user after listening to port 80.

<caucho.com>
  <user-name>httpd</user-name>
  <group-name>daemon</group-name>
</caucho.com>

system-property

Sets a Java system property. The effect is the same as if you had called System.setProperty before starting Resin.

<caucho.com>
  <system-property foo=bar/>
</caucho.com>

security-provider

Adds a Java security provider without modifying the java.security.

<caucho.com>
  <security-provider id='com.sun.net.ssl.internal.ssl.Provider'/>
</caucho.com>

security-manager

Enables the a Java security manager. Normal configurations will not use a security manager, because the security manager slows performance. ISPs may want to add a security-manager to prevent some actions by the clients.

By default, all web-apps have read/write/delete access to the entire web-app.

<caucho.com>
  <security-manager/>
  ...
</caucho.com>

user-name

Sets Unix user. To listen to port 80, Unix systems require Resin to start as root. user-name lets the server change to a safer user after listening to port 80.

<caucho.com>
  <user-name>httpd</user-name>
  <group-name>daemon</group-name>
</caucho.com>

Formal Description

caucho.com ::= java,
               log*,
               smtp.vfs,
               user-name,
               group-name,
               system-property*,
               security-provider,
               security-manager,
               http-server

java ::= compiler,
         compiler-args,
         encoding,
         classpath
         max-compile-time

log ::= href,
        timestamp,
        rollover-count,
        rollover-period


Taglib Config
Configuration
Host resin.conf
Copyright © 1998-2002 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark, and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.