Configure the endpoint of the application resources (Apache Tomcat)
For the Apache Tomcat server, configure the endpoint of the application resources in the server.xml file.
Purpose
Since IBM Worklight v6.0, follow this procedure when we must change the URI protocol, hostname, and port used by the Application Center client to manage the applications on the device.
Properties
Edit the server.xml file in the conf directory of the Apache Tomcat installation.
Add an entry for each property in the <context> section of the corresponding application. This entry should have the following syntax:
<Environment name="JNDI_property_name" value="property_value" type="property_type" override="false"/>
Where:
JNDI_property_name is the name of the property you are adding.
property_value is the value of the property you are adding.
property_type is the type of the property you are adding.
in the server.xml file for configuring the endpoint of the application
Property Type Description ibm.appcenter.services.endpoint java.lang.String The URI of the Application Center REST services (applicationcenter.war). In a scenario with a firewall or a secured reverse proxy, this URI must be the external URI and not the internal URI inside the local LAN. ibm.appcenter.proxy.protocol java.lang.String The protocol of the application resources URI. This property is optional. It is only needed if the protocol of the external and of the internal URI are different. ibm.appcenter.proxy.host java.lang.String The hostname of the application resources URI. ibm.appcenter.proxy.port java.lang.Integer The port of the application resources URI. This property is optional. It is only needed if the protocol of the external and of the internal URI are different. For a complete list of JNDI properties we can set, see List of JNDI properties for the Application Center.
Example of setting server.xml properties for configuring the endpoint
This example shows the settings of the properties in the server.xml file required for configuring the endpoint of the application resources.
In the <context> section of the Application Center console application:
<Environment name="ibm.appcenter.services.endpoint" value="https://appcntr.net:443/applicationcenter" type="java.lang.String" override="false"/>
Use the asterisk (*) character as wildcard to specify that the Application Center REST services use the same value as the Application Center console. For example: *://*:*/appcenter means use the same protocol, host, and port as the Application Center console, but use appcenter as context root.
In the <context> section of the Application Center services application:
<Environment name="ibm.appcenter.services.endpoint" value="https://appcntr.net:443/applicationcenter" type="java.lang.String" override="false"/> <Environment name="ibm.appcenter.proxy.protocol" value="https" type="java.lang.String" override="false"/> <Environment name="ibm.appcenter.proxy.host" value="appcntr.net" type="java.lang.String" override="false"/> <Environment name="ibm.appcenter.proxy.port" value="443" type="java.lang.Integer" override="false"/>
Parent topic: Defining the endpoint of the application resources