Control directives

From CauchoWiki

Jump to: navigation, search


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.

directivemeaning
<resin:if>configures a block conditionally
resin:importimports a file into the current directive
resin:messageoutput a log message during configuration
resin:setsets a variable or jndi-value
resin:chooseselects 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.

tagmeaning
fileseta set of files to import
paththe file to import
optionalif 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.

[edit] 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