caucho
Resin
FAQ
Reference Guide
JavaDoc
Demo
Tutorial

Getting Started
Configuration
EJB
Topics
JSP
XTP/XSL

Basic Config
Resin Config
HTTP Config
App Config
Servlet Config
SSL
Login Config
Taglib Config
Summary
 

Basic Config
Configuration
HTTP Config

General (non-HTTP) configuration. resin.conf is actually a general configuration file, like NT's registry. So some Resin modules like logging and DBPool also 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/srun-port refers to a configuration like:

<caucho.com>
  <http-server>
    <srun-port>6802</srun-port>
  </http-server>
</caucho.com>

That example could be rewritten as:

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

Index
group-name
http-server
java
jsp
log
resin:include
security-provider
smtp.vfs
system-property
user-name

log

Starts logging for debugging.

AttributeMeaning
idName of debugging section
hrefDestination file
timestamptimestamp format
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

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
%mday of month
%Mminute
%pam/pm
%Sseconds
%smilliseconds
%Wweek of year
%wday of week
%y2-digit year
%Y4-digit year

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>

java

Configuration for the Java compiler.

AttributeMeaningDefault
compilerPath to the java compiler or "internal"internal
work-dirDirectory for JSP, XSL, and JS compiled *.java/tmp/caucho
compiler-argsExtra args to pass to the compilernone

work-dir is used by any part of Resin that needs to generate temporary files. For example, the JSP engine puts the generated *.java and *.class files in work-dir. The XSL and JavaScript compilers also put their generated *.java and *.class files in work-dir.

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

jsp

JSP configuration

AttributeMeaningDefault
precompileuse precompiled JSP classes if availabletrue
sessionenable/disable sessions by default.true
static-encodingallow JSP to precompile character encodingtrue
recompile-on-errorIf the JSP page throws a java.lang.Error, recompile it. (since Resin 1.2.3)false

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 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>

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>

You must use the bin/resin launcher to use user-name:

unix> bin/resin -conf conf/test.conf


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