Could there be a way to specify the web context label in Tomcat configuration?

After installing Lucee, we gave our contexts labels using the Web Contexts section at the bottom of the main Lucee admin page. But Lucee updates and Tomcat updates cause these to be lost, and our web applications start logging to hash-named folders again. Which causes a number of problems.

I’m willing to get rid of mod_cfml and manually declare my hosts in Tomcat if I could specify the label there. Maybe it would look something like this, in conf/Catalina/mysite/ROOT.xml ?

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:/inetpub/wwwroot/mysite">
  <Parameter name="web-context-label" value="mysite">
</Context>

Could this be possible? Or is there another way to go about it?

I know the labels are maintained in lucee-server.xml, but I don’t see an easy way to script that modification, since I would need to know the hash to be able to modify that XML programmatically.

And the loss of labels seems to happen randomly. On some Lucee updates it keeps it, other times it gets reset. When I look in in lucee-server.xml there are a couple entries with the same label but different hashes. Perhaps the hashing code has changed in some Lucee versions, this could be why the label mapping gets lost. I think even an underlying hashing algorithm in the JVM change would cause it.

I’ve experienced this and agree it’s annoying. All my scheduled tasks vanish every time it happens, and as you say it seems to be somewhat random.