Camunda Tomcat distribution APP_ROOT

I have noticed that in the web application of Camunda Tasklist/Admin/Cockpit, the href locations points towards $APP_ROOT/something.

When I try to launch the stand-alone version, the environment variable gets converted to its real value and the application works, but when I try to deploy the app on a custom tomcat it doesn’t.

What is the trick that converts that placeholder variable?

Hi Edmondo,

I do not think that $APP_ROOT (in the HTML sources) is linked to an environment variable (but I might be wrong though)

Personally, I suspect that this $APP_ROOT is “generated” from the serverlet (but for me, Java is an island, so…).
You may have a quick look at that:


1 Like

Hi @Edmondo_Porcu,

it’s filtered during html request on the server side, as @vale mentioned in ProcessEnginesFilter based on current configuration of contextPath.

protected String replacePlaceholder(String data, String appName, String engineName, String contextPath, HttpServletRequest request, HttpServletResponse response) { return data.replace(APP_ROOT_PLACEHOLDER, contextPath) .replace(BASE_PLACEHOLDER, String.format("%s/app/%s/%s/", contextPath, appName, engineName)) .replace(PLUGIN_PACKAGES_PLACEHOLDER, createPluginPackagesStr(appName, contextPath)) .replace(PLUGIN_DEPENDENCIES_PLACEHOLDER, createPluginDependenciesStr(appName)); }
which is initialized from your request data String contextPath = request.getContextPath();

what are you trying to do exactly? get latest master running on tomcat installation?

Best regards,


I’m having a similar issue when trying to embed the task list inside of our web app, and Camunda isn’t replacing APP_ROOT with a proper value.

Where do you set the contextPath in Tomcat to the URL so that it can be properly replaced?