Differences between revisions 6 and 7
Revision 6 as of 2010-12-16 12:16:39
Size: 2303
Comment:
Revision 7 as of 2010-12-16 12:32:21
Size: 2606
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
KILL!!! that is (almost) it! However, the {{{.WAR}}} file must contain a proper configuration file and the {{{dk.statsbiblioteket.iprolemapping.configurationFile context-param}}} must be defined in the {{{web.xml}}} in order to make this work. You will need to modify (or add) the {{{dk.statsbiblioteket.doms.iprolemapper.webservice.IPRoleMapperService.configurationFile}}} parameter of the context configuration for the WAR file (e.g. the file {{{../tomcat/config/context.xml}}}) and assign it with the file path to the IP role mapper configuration file which you want the service to use.
Line 7: Line 7:
You will need to modify (or add) the {{{dk.statsbiblioteket.doms.iprolemapper.webservice.IPRoleMapperService.configurationFile context-param}}} of the context configuration for the WAR (e.g. the file {{{../tomcat/config/context.xml}}}) and assign it with the file path to the IP role mapper configuration file which you want the service to use.

KILL!!! However, the serv That is, this will override any default configuration specified by the {{{web.xml}}} file in the IP role mapper {{{.WAR}}} file.

Example of the {{{<context-param>}}} element to add to the {{{context.xml}}} file:
Example of the IP role mapper configuration {{{<Parameter>}}} element to add to the {{{context.xml}}} file:
Line 18: Line 14:
The <code>override</code> attribute in the above ensures that the parameter cannot be overridden by the {{{WEB-INF/web.xml}}} file in the {{{.WAR}}} file. The <code>override</code> attribute in the above ensures that the parameter cannot be overridden by the {{{WEB-INF/web.xml}}} file in the {{{.WAR}}} file. Thus, you are sure that the service actually loads the configuration file you expect it to load.
Line 20: Line 16:
You will also need to provide a Log4J configuration file in order to enable the service to produce a meaningful log output. However, it will use the default logging mechanism and configuration provided by Tomcat if you fail to do so. You will also need to provide a Log4J configuration file in order to enable the service to produce meaningful log output. However, it will use the default logging mechanism and configuration provided by Tomcat if you fail to do so.
Line 22: Line 18:
Setting up the log configuration is just as easy as setting up the IP rolemapper itself. All you need to do is to add Setting up the log4J configuration is just as easy as setting up the IP role mapper itself. All you need to do is to modify (or add) the {{{dk.statsbiblioteket.doms.iprolemapper.log4jConfigurationFilePath}}} parameter of the context configuration for the WAR file (e.g. the file {{{../tomcat/config/context.xml}}}) and assign it with the file path to the log4J configuration file which you want the service to use.
Line 24: Line 20:
If the IP role mapper service applies a default configuration file then the {{{WEB-INF/web.xml}}} file of its {{{.WAR}}} file will contain an entry like this: Example of the log4J configuration {{{<context-param>}}} element to add to the {{{context.xml}}} file:
Line 27: Line 23:
   <context-param>
       <param-name>dk.statsbiblioteket.iprolemapping.configurationFile</param-name>
        <param-value>/WEB-INF/ipRangesAndRoles.xml</param-value>
    </context-param>
   <Parameter name="dk.statsbiblioteket.doms.iprolemapper.log4jConfigurationFilePath"
              value="/path/to/the/log4J/configuration/file.xml override="false"/>
Line 33: Line 27:
and thus, the {{{.WAR}}} file will obviously also contain the file {{{WEB-INF/ipRangesAndRoles.xml}}}. Again, notice the <code>override</code> attribute in the above. It should be obsolete, however, it will not do any harm and it will ensure that the service loads the configuration you expect it to load.

The IP role mapper release bundle contains an example IP-role mapper configuration file as well as an example Log4J configuration file. Just unpack the ZIP file and have a look under the {{{<release bundle root>/data}}} to get inspiration for your own configurations.

Installation of the IP-Role Mapper Web-service

Installing the IP role mapper is a walk in the park. All there is to do is to drop the .WAR file into the ../tomcat/webapps directory and provide a IP role mapping and Log4J configuration file.

You will need to modify (or add) the dk.statsbiblioteket.doms.iprolemapper.webservice.IPRoleMapperService.configurationFile parameter of the context configuration for the WAR file (e.g. the file ../tomcat/config/context.xml) and assign it with the file path to the IP role mapper configuration file which you want the service to use.

Example of the IP role mapper configuration <Parameter> element to add to the context.xml file:

   <Parameter name="dk.statsbiblioteket.doms.iprolemapper.webservice.IPRoleMapperService.configurationFile"
              value="/path/to/the/ip-rolemapper/configuration/file.xml override="false"/>

The <code>override</code> attribute in the above ensures that the parameter cannot be overridden by the WEB-INF/web.xml file in the .WAR file. Thus, you are sure that the service actually loads the configuration file you expect it to load.

You will also need to provide a Log4J configuration file in order to enable the service to produce meaningful log output. However, it will use the default logging mechanism and configuration provided by Tomcat if you fail to do so.

Setting up the log4J configuration is just as easy as setting up the IP role mapper itself. All you need to do is to modify (or add) the dk.statsbiblioteket.doms.iprolemapper.log4jConfigurationFilePath parameter of the context configuration for the WAR file (e.g. the file ../tomcat/config/context.xml) and assign it with the file path to the log4J configuration file which you want the service to use.

Example of the log4J configuration <context-param> element to add to the context.xml file:

   <Parameter name="dk.statsbiblioteket.doms.iprolemapper.log4jConfigurationFilePath"
              value="/path/to/the/log4J/configuration/file.xml override="false"/>

Again, notice the <code>override</code> attribute in the above. It should be obsolete, however, it will not do any harm and it will ensure that the service loads the configuration you expect it to load.

The IP role mapper release bundle contains an example IP-role mapper configuration file as well as an example Log4J configuration file. Just unpack the ZIP file and have a look under the <release bundle root>/data to get inspiration for your own configurations.

IPRoleMapperInstallation (last edited 2011-03-22 12:51:13 by jrg)