Differences between revisions 1 and 13 (spanning 12 versions)
Revision 1 as of 2010-11-19 15:03:47
Size: 501
Comment:
Revision 13 as of 2011-03-22 12:51:13
Size: 2607
Editor: jrg
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
context-param 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/conf/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:
Line 6: Line 10:
   <context-param>
        <param-name>dk.statsbiblioteket.iprolemapping.configurationFile</param-name>
        <param-value>/path/to/the/configuration/file.xml</param-value>
    </context-param>
   <Parameter name="dk.statsbiblioteket.doms.iprolemapper.webservice.IPRoleMapperService.configurationFile"
              value="/path/to/the/ip-rolemapper/configuration/file.xml" override="false"/>
}}}
Line 11: Line 14:
The {{{override}}} 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 12: Line 16:
}}}
E.g.
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/conf/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 {{{<Parameter>}}} element to add to the {{{context.xml}}} file:
Line 16: 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 21: Line 27:
Again, notice the {{{override}}} 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.
Line 22: Line 29:
}}} 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/conf/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 override 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/conf/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 <Parameter> 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 override 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)