Control directives

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Configuration]]
+
{{Cleanup}} [[Category:Configuration]]
  
The tags in the namespace http://caucho.com/ns/resin/core provide general configuration abilities like conditional configuration.
+
The directives in the namespace http://caucho.com/ns/resin/core provide general configuration abilities like conditional configuration.
  
 
In general, we recommend avoiding the use of resin:if and resin:choose when possible, in order to keep configuration files manageable.
 
In general, we recommend avoiding the use of resin:if and resin:choose when possible, in order to keep configuration files manageable.
  
 
{|
 
{|
!tag||meaning
+
!directive||meaning
 
|-
 
|-
 
||<[[resin if|resin:if]]>||configures a block conditionally
 
||<[[resin if|resin:if]]>||configures a block conditionally
 
|-
 
|-
||[[resin import|resin:import]]||imports a file into the current tag
+
||[[resin import|resin:import]]||imports a file into the current directive
 
|-
 
|-
 
||[[resin message|resin:message]]||output a log message during configuration
 
||[[resin message|resin:message]]||output a log message during configuration
 
|-
 
|-
||[[resin set|resin:set]||sets a variable or jndi-value
+
||[[resin set|resin:set]]||sets a variable or jndi-value
 
|-
 
|-
 
||[[resin choose|resin:choose]]||selects one of a group of choices.
 
||[[resin choose|resin:choose]]||selects one of a group of choices.

Latest revision as of 21:15, 1 December 2011

40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

The directives in the namespace http://caucho.com/ns/resin/core provide general configuration abilities like conditional configuration.

In general, we recommend avoiding the use of resin:if and resin:choose when possible, in order to keep configuration files manageable.

directive meaning
<resin:if> configures a block conditionally
resin:import imports a file into the current directive
resin:message output a log message during configuration
resin:set sets a variable or jndi-value
resin:choose selects one of a group of choices.

resin:import imports a configuration file into the current tag. The configuration file will match the current context, the a resin:import file in a <web-app> will be an XML file with a <web-app> tag.

tag meaning
fileset a set of files to import
path the file to import
optional if true, the target is optional

The web.xml and resin-web.xml files are loaded with a resin:import tag in the conf/app-default.xml file.

app-default.xml

...
<web-app-default>
  ...
  <resin:import path="WEB-INF/web.xml" optional="true"/>
  <resin:import path="WEB-INF/resin-web.xml" optional="true"/>
</web-app-default>
...
Personal tools