Specifying a per-environment application context root
You can specify the application context root per-environment basis. However, consider this advanced configuration only if you have environments that require the specific setup.
Procedure
The context root is specified in the server.xml file for all the
WAR files that are run by the server, and it provides an extra path for the
URL.
See the following
example:
<server>
<application type="war" context-root="odm/test/DecisionService"location="${server.config.dir}/apps/DecisionService.war">
…
</application>
</server>When
you use this configuration in the server.xml file, the URL for a decision
service looks like
this:
https://app.example.com:9443/odm/test/DecisionService/rest/loans/1.0/miniloan/1.0Then,
the context root can be used to configure the web.xml file for protecting the
HTDS on a per-environment basis by using a more specific
URL:
<security-constraint>
<web-resource-collection>
<web-resource-name>Decision Service REST API</web-resource-name>
<url-pattern>/odm/test/rest/*</url-pattern>
<url-pattern>/odm/test/ws/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>resServiceTesters</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>