📄 env-tags.xtp
字号:
<def title="<log> schema">element log { archive-format? & format? & formatter? & handler? & level? & mbean-name? & name & path? & path-format? & rollover-count? & rollover-period? & rollover-size? & timestamp? & use-parent-handlers?}</def></defun><defun title="<logger>" occur="*"><parents>resin, cluster, host, web-app</parents><p><log> configures JDK 1.4 java.util.logger Logger level.</p><p>The <a href="config-log.xtp">log configuration</a> describeslog in detail.</p><deftable title="<logger> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>level</td> <td>the java.util.logging level: finest, finer, fine, config, info, warning, severe</td> <td>info</td></tr><tr> <td>name</td> <td>the java.util.logging name, typically a classname</td> <td>required</td></tr><tr> <td>use-parent-handlers</td> <td>if true, parent handlers are also invoked</td> <td>true</td></tr></deftable><def title="<logger> schema">element logger { name & level? & use-parent-handlers?}</def><example title="Example: compilation logging"><resin xmlns="http://caucho.com/ns/resin"> <log name="" level="all" path="log/debug.log"/> <logger name="com.caucho.java" level="fine"/> <cluster id="app-tier"> ... </cluster></resin></example></defun><defun title="<mail>" occur="*" version="Resin 3.0"><parents>resin, cluster, host, web-app</parents><p><mail> configures a javax.mail.Session object and makesit available in Resin-IoC/WebBeans. Mail properties can beconfigured using the properties attribute. Some of the most commonproperties can be configured directly on the <mail> tag.</p><deftable title="<mail> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>authenticator</td> <td>sets the javamail authenticator</td> <td></td></tr><tr> <td>debug</td> <td>sets the mail.debug flag</td> <td></td></tr><tr> <td>from</td> <td>sets the mail.from property</td> <td></td></tr><tr> <td>host</td> <td>sets the mail.host property</td> <td></td></tr><tr> <td>imap-host</td> <td>sets the mail.imap.host property</td> <td></td></tr><tr> <td>imap-port</td> <td>sets the mail.imap.port property</td> <td></td></tr><tr> <td>imap-user</td> <td>sets the mail.imap.user property</td> <td></td></tr><tr> <td>init</td> <td>IoC configuration for other properties</td> <td></td></tr><tr> <td>jndi-name</td> <td>JNDI name to store the mail Session</td> <td></td></tr><tr> <td>name</td> <td>Resin-IoC/WebBeans @Named value</td> <td></td></tr><tr> <td>pop3-host</td> <td>sets the mail.pop3.host property</td> <td></td></tr><tr> <td>pop3-port</td> <td>sets the mail.pop3.port property</td> <td></td></tr><tr> <td>pop3-user</td> <td>sets the mail.pop3.user property</td> <td></td></tr><tr> <td>properties</td> <td>general mail properties in property file format</td> <td></td></tr><tr> <td>smtp-host</td> <td>sets the mail.smtp.host property</td> <td></td></tr><tr> <td>smtp-port</td> <td>sets the mail.smtp.port property</td> <td></td></tr><tr> <td>smtp-user</td> <td>sets the mail.smtp.user property</td> <td></td></tr><tr> <td>store-protocol</td> <td>sets the mail.store.protocol property</td> <td></td></tr><tr> <td>transport-protocol</td> <td>sets the mail.transport.protocol property</td> <td></td></tr><tr> <td>user</td> <td>sets the mail.user property</td> <td></td></tr></deftable><def title="<mail> schema">element mail { authenticator? & debug? & from? & host? & imap-host? & imap-port? & imap-user? & init? & jndi-name? & name? & pop3-host? & pop3-port? & pop3-user? & smtp-host? & smtp-port? & smtp-user? & store-protocol? & transport-protocol? & user?}</def><example title="Example: mail"><web-app xmlns="http://caucho.com/ns/resin"> <mail jndi-name="java:comp/env/mail"> <from>noreply@foo.com</from> <smtp-host>localhost</smtp-host> <smtp-port>25</smtp-port> <properties> mail.smtp.starttls.enable=true </properties> </mail></web-app></example></defun><defun title="<reference>" occur="*" version="Resin 3.0"><parents>resin, cluster, host, web-app</parents> <!-- com.caucho.config.types.ReferenceConfig --><p><reference> configures a JNDI ObjectFactory. Some legacyresources are configured using an ObjectFactory syntax. The <reference>tag provides a compatible way to configure those objects. More modernresources should use <bean> or <component> for IoC configuration.</p><p>JNDI ObjectFactories are used to create objects from JNDI references.The <reference> tag configures the ObjectFactory and stores it in JNDI.</p><deftable title="<reference> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><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><def title="<reference> schema">element reference { factory & jndi-name & init-param*}</def><example title="Example: Hessian client reference"><web-app xmlns="http://caucho.com/ns/resin"><reference> <jndi-name>hessian/hello</jndi-name> <factory>com.caucho.hessian.client.HessianProxyFactory</factory> <init url="http://localhost:8080/ejb/hello"/> type="test.HelloHome"/></reference></web-app></example></defun><defun title="<remote-client>"><parents>cluster, host, web-app</parents><p><remote-client> configures a proxy to a web-service.It uses a Java interface and a URI to select the web-service.</p><p>The URI is defined as: <var>protocol:url=location</var>, wherelocation is typically a HTTP URL.</p><ul><li>See <a href="resin-remoting.xtp">Resin remoting</a> for moreinformation, including how to write an adapter for Resin remoting.</li><li>See the <a href="../examples/remote-hello-world/">hello world tutorial</a>for an example.</li></ul><deftable title="<remote-client> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>class</td> <td>Class name of the protocol implementation</td> <td>required (or <var>uri</var>)</td></tr><tr> <td>init</td> <td>IoC initialization for the protocol implementation</td> <td></td></tr><tr> <td>name</td> <td><a href="resin-ioc.xtp#@Named">@Named</a> binding for Resin-IoC</td> <td></td></tr><tr> <td>jndi-name</td> <td>JNDI binding name</td> <td></td></tr><tr> <td>uri</td> <td>Shortcut alias name for the protocol class</td> <td></td></tr></deftable><deftable title="remote-client protocols"><tr> <td>URI</td> <td>Description</td></tr><tr> <td><var>cxf</var>:url=http://foo.com/hello/cxf</td> <td>Defines a cxf service. See <a href="http://wiki.caucho.com/CXF">http://wiki.caucho.com/CXF</a> for more information.</td></tr><tr> <td><var>burlap</var>:url=http://foo.com/hello/burlap</td> <td>Defines a burlap service at http://foo.com/hello/burlap</td></tr><tr> <td><var>hessian</var>:url=http://foo.com/hello/hessian</td> <td>Defines a hessian service at http://foo.com/hello/hessian</td></tr><tr> <td><var>xfire</var>:url=http://foo.com/hello/cxf</td> <td>Defines a xfire client. See <a href="http://wiki.caucho.com/XFire">http://wiki.caucho.com/XFire</a> for more information.</td></tr></deftable><def title="remote-client">element remote-client { (class|uri) & name? & jndi-name? & interface}</def></defun> <!-- remote-client --><defun title="<resin:choose>" version="Resin 3.0.7"><p>resin:choose implements an if, elsif, else.</p><deftable title="<resin:choose> Attributes"><tr> <th>Attribute</th> <th>Description</th></tr><tr> <td>resin:when</td> <td>A configuration section executed when matching a test condition</td></tr><tr> <td>resin:otherwise</td> <td>A fallback section executed when the tests fail</td></tr></deftable><p>The <resin:choose> schema is context-dependent. A <resin:choose>in a <web-app> will have <web-app> content, while a <resin:choose>in a <host> will have <host> content.</p><def title="<resin:choose> schema">element resin:choose { resin:when*, resin:otherwise}element resin:when { attribute test { string }, <var>context-dependent content</var>}element resin:otherwise { <var>context-dependent content</var>}</def><example title="Example: resin:choose usage pattern"><resin:choose> <resin:when test="${expr1}"> ... </resin:when> <resin:when test="${expr2}"> ... </resin:when> <resin:otherwise> ... </resin:otherwise><resin:choose></example><s2 title="<resin:when>" version="Resin 3.0.7" type="defun"><parents>resin:choose</parents><p><resin:when> conditionally configures a block within a<resin:choose> block. If the <var>test</var> matches, Resin willuse the enclosed configuration.</p><deftable title="<resin:when> Attributes"><tr> <th>Attribute</th> <th>Description</th></tr><tr> <td>test</td> <td>the test to perform</td></tr></deftable><def title="<resin:when> schema">element resin:when { attribute test { string }, <var>context-dependent content</var>}</def></s2><s2 title="<resin:otherwise>" version="Resin 3.0.7" type="defun"><parents>resin:choose</parents><p><resin:otherwise> is the catch-all configuration for a <resin:choose>block when none of the <resin:when> items match.</p><def title="<resin:otherwise> schema">element resin:otherwise { <var>context-dependent content</var>}</def></s2></defun> <!-- resin:choose --><defun title="<resin:if>" version="Resin 3.0.7"><p>resin:if executes part of the configuration file conditionally. resin:ifcan be particularly useful in combination with Java command-line propertieslike -Dfoo=bar to enable development mode or testing configuration.</p><deftable title="<resin:if> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>test</td> <td>the test to perform</td> <td>required</td></tr></deftable><p>The resin:if schema is context-dependent. For example, resin:if ina <web-app> will have web-app content while resin:if in a <host>will have host content.</p><def title="<resin:if> schema">element resin:if { attribute test { string } <var>context-dependent content</var>}</def><example title="Example: enable debugging for -Ddevelopment"><resin xmlns="http://caucho.com/ns/resin" xmlns:core="http://caucho.com/ns/resin/core"> <resin:if test="${system['development']}"> <logger name="com.foo" level="finer"/> </resin:if> ...</resin></example></defun> <!-- resin:if --><defun title="<resin:import>" version="Resin 3.0.7" type="defun"><p><resin:import> reads configuration from another file or set offiles. For example, the WEB-INF/web.xml and WEB-INF/resin-web.x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -