
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>
|
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>
|
Configuration for the Java compiler.
| Attribute |
Meaning |
Default
|
| compiler |
Path to the java compiler or "internal" |
internal
|
| work-dir |
Directory for JSP, XSL, and JS compiled *.java |
/tmp/caucho
|
| compiler-args |
Extra args to pass to the compiler |
none
|
| encoding |
Character encoding (Resin 1.2.4) |
none
|
| classpath |
extra classpath (Resin 1.2.3) |
none
|
| max-compile-time |
Limits the time for a Java compilation (Resin 1.2.3) |
30 sec
|
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 configuration
| Attribute |
Meaning |
Default
|
| auto-compile |
compile the JSP if it's changed |
true
|
| precompile |
use precompiled JSP classes if available |
true
|
| session |
enable/disable sessions by default. |
true
|
| static-encoding |
allow JSP to precompile character encoding |
true
|
| jsp-max |
limit the number of active JSP pages |
1024
|
| recompile-on-error |
If the JSP page throws a java.lang.Error, recompile it. (since Resin 1.2.3) |
false
|
Starts logging for debugging.
| Attribute |
Meaning |
default
|
| id |
Name of debugging section |
none
|
| href |
Destination file |
none
|
| timestamp |
timestamp format |
none
|
| rollover-count |
how many rotated (href.n) logs to keep. |
2
|
| rollover-period |
How 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 value |
Meaning
|
| / |
Debug everything
|
| /caucho.com/jsp |
Debug jsp
|
| /caucho.com/java |
See all Java compilation
|
| /caucho.com/xsl |
XSL 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:
| Pattern |
Meaning
|
| %a |
short weekday (mon, tue, ...)
|
| %A |
long weekday (Monday, Tuesday, ...)
|
| %b |
short month (Jan, Feb, ...)
|
| %B |
long month (January, February, ...)
|
| %c |
locale specific date
|
| %d |
day of month
|
| %H |
24-hour
|
| %I |
12-hour
|
| %j |
day of year
|
| %m |
month
|
| %M |
minute
|
| %p |
am/pm
|
| %S |
seconds
|
| %s |
milliseconds
|
| %W |
week of year
|
| %w |
day of week
|
| %y |
2-digit year
|
| %Y |
4-digit year
|
VFS mailto: configuration. The smtp.vfs configuration only
applies to the mailto: scheme in Resin's VFS. See the form mailing tutorial.
| Attribute |
Meaning |
Default
|
| host |
SMTP host |
localhost
|
| port |
SMTP port |
25
|
| sender |
sending mail address |
The current user and local host
|
httpd and srun configuration.
Configures both http and srun. The
configuration is identical.
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>
|
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>
|
Adds a Java security provider without modifying the java.security.
<caucho.com> <security-provider id='com.sun.net.ssl.internal.ssl.Provider'/> </caucho.com>
|
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>
|
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
|
Copyright © 1998-2001 Caucho Technology. All rights reserved.
Copyright © 1998-2001 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc.
|
 |
|