⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 env-tags.xtp

📁 RESIN 3.2 最新源码
💻 XTP
📖 第 1 页 / 共 5 页
字号:
<def title="&lt;log> schema">element log {  archive-format?  &amp; format?  &amp; formatter?  &amp; handler?  &amp; level?  &amp; mbean-name?  &amp; name  &amp; path?  &amp; path-format?  &amp; rollover-count?  &amp; rollover-period?  &amp; rollover-size?  &amp; timestamp?  &amp; use-parent-handlers?}</def></defun><defun title="&lt;logger>" occur="*"><parents>resin, cluster, host, web-app</parents><p>&lt;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="&lt;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="&lt;logger> schema">element logger {  name  &amp; level?  &amp; use-parent-handlers?}</def><example title="Example: compilation logging">&lt;resin xmlns="http://caucho.com/ns/resin">  &lt;log name="" level="all" path="log/debug.log"/>  &lt;logger name="com.caucho.java" level="fine"/>  &lt;cluster id="app-tier">    ...  &lt;/cluster>&lt;/resin></example></defun><defun title="&lt;mail>" occur="*" version="Resin 3.0"><parents>resin, cluster, host, web-app</parents><p>&lt;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 &lt;mail> tag.</p><deftable title="&lt;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="&lt;mail> schema">element mail {  authenticator?  &amp; debug?  &amp; from?  &amp; host?  &amp; imap-host?  &amp; imap-port?  &amp; imap-user?  &amp; init?  &amp; jndi-name?  &amp; name?  &amp; pop3-host?  &amp; pop3-port?  &amp; pop3-user?  &amp; smtp-host?  &amp; smtp-port?  &amp; smtp-user?  &amp; store-protocol?  &amp; transport-protocol?  &amp; user?}</def><example title="Example: mail">&lt;web-app xmlns="http://caucho.com/ns/resin">  &lt;mail jndi-name="java:comp/env/mail">    &lt;from>noreply@foo.com&lt;/from>    &lt;smtp-host>localhost&lt;/smtp-host>    &lt;smtp-port>25&lt;/smtp-port>    &lt;properties>      mail.smtp.starttls.enable=true    &lt;/properties>  &lt;/mail>&lt;/web-app></example></defun><defun title="&lt;reference>" occur="*" version="Resin 3.0"><parents>resin, cluster, host, web-app</parents>  <!-- com.caucho.config.types.ReferenceConfig --><p>&lt;reference> configures a JNDI ObjectFactory.  Some legacyresources are configured using an ObjectFactory syntax.  The &lt;reference>tag provides a compatible way to configure those objects.  More modernresources should use &lt;bean> or &lt;component> for IoC configuration.</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 title="&lt;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="&lt;reference> schema">element reference {  factory   &amp; jndi-name  &amp; init-param*}</def><example title="Example: Hessian client reference">&lt;web-app xmlns="http://caucho.com/ns/resin">&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;&lt;/web-app></example></defun><defun title="&lt;remote-client>"><parents>cluster, host, web-app</parents><p>&lt;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="&lt;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)  &amp; name?  &amp; jndi-name?  &amp; interface}</def></defun> <!-- remote-client --><defun title="&lt;resin:choose>" version="Resin 3.0.7"><p>resin:choose implements an if, elsif, else.</p><deftable title="&lt;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 &lt;resin:choose> schema is context-dependent.  A &lt;resin:choose>in a &lt;web-app> will have &lt;web-app> content, while a &lt;resin:choose>in a &lt;host> will have &lt;host> content.</p><def title="&lt;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">&lt;resin:choose&gt;  &lt;resin:when test="${expr1}"&gt;    ...  &lt;/resin:when&gt;  &lt;resin:when test="${expr2}"&gt;    ...  &lt;/resin:when&gt;  &lt;resin:otherwise&gt;    ...  &lt;/resin:otherwise&gt;&lt;resin:choose&gt;</example><s2 title="&lt;resin:when>" version="Resin 3.0.7" type="defun"><parents>resin:choose</parents><p>&lt;resin:when> conditionally configures a block within a&lt;resin:choose> block.  If the <var>test</var> matches, Resin willuse the enclosed configuration.</p><deftable title="&lt;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="&lt;resin:when> schema">element resin:when {  attribute test { string },  <var>context-dependent content</var>}</def></s2><s2 title="&lt;resin:otherwise>" version="Resin 3.0.7" type="defun"><parents>resin:choose</parents><p>&lt;resin:otherwise> is the catch-all configuration for a &lt;resin:choose>block when none of the &lt;resin:when> items match.</p><def title="&lt;resin:otherwise> schema">element resin:otherwise {  <var>context-dependent content</var>}</def></s2></defun> <!-- resin:choose --><defun title="&lt;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="&lt;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 &lt;web-app> will have web-app content while resin:if in a &lt;host>will have host content.</p><def title="&lt;resin:if> schema">element resin:if {  attribute test { string }  <var>context-dependent content</var>}</def><example title="Example: enable debugging for -Ddevelopment">&lt;resin xmlns="http://caucho.com/ns/resin"        xmlns:core="http://caucho.com/ns/resin/core">  &lt;resin:if test="${system['development']}"&gt;    &lt;logger name="com.foo" level="finer"/>  &lt;/resin:if&gt;  ...&lt;/resin></example></defun> <!-- resin:if --><defun title="&lt;resin:import>" version="Resin 3.0.7" type="defun"><p>&lt;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 + -