Custom Variables passed to lucee-server.xml?

165 views
Skip to first unread message

Scott Smith

unread,
Aug 5, 2015, 10:40:26 AM8/5/15
to lu...@googlegroups.com
Is it possible to pass custom variables to the lucee-server.xml? Maybe via init-params on the Tomcat web.xml? Or is there some way I can reference environment variables I have setup for the Tomcat service within the lucee-server.xml?


Alex Skinner

unread,
Aug 5, 2015, 11:55:23 AM8/5/15
to lu...@googlegroups.com
You can get at environment variables in lucee 5 check out the lucee heroku build pack for an example and we are working on an enhancement to allow you to reference env variables in your lucee config xml

Cheers

Alex

On Wednesday, 5 August 2015, Scott Smith <scottad...@gmail.com> wrote:
Is it possible to pass custom variables to the lucee-server.xml? Maybe via init-params on the Tomcat web.xml? Or is there some way I can reference environment variables I have setup for the Tomcat service within the lucee-server.xml?


--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CADhKUgFUg8Ooqg16iiOeQ-9N%2B8bk%3D3fGK_pnjqz808sJ52w_pw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Alex Skinner
Managing Director

Pixl8 Interactive, 3 Tun Yard, Peardon Street, London
SW8 3HT, United Kingdom



T: +44 [0] 845 260 0726 W: www.pixl8.co.uk E: in...@pixl8.co.uk




Follow us on: Facebook Twitter LinkedIn



CONFIDENTIAL AND PRIVILEGED - This e-mail and any attachment is intended solely for the addressee, is strictly confidential and may also be subject to legal, professional or other privilege or may be protected by work product immunity or other legal rules. If you are not the addressee please do not read, print, re-transmit, store or act in reliance on it or any attachments. Instead, please email it back to the sender and then immediately permanently delete it. Pixl8 Interactive Ltd Registered in England. Registered number: 04336501. Registered office: 8 Spur Road, Cosham, Portsmouth, Hampshire, PO6 3EB


Scott Smith

unread,
Aug 5, 2015, 12:28:22 PM8/5/15
to lu...@googlegroups.com
Bummer. So this is not possible prior to version 5? As it stands I am setting up an entirely new setup/configuration for our production servers as we move from Railo to Lucee, so I think it would be a tough sell for our first stab to be running on a beta release.  We have a bunch of "shared" functionality that resides in a framework directory that sites next to many of our applications in the web root.  Also, many of our applications are nested within subdirectories.  I am trying to eliminate the need to have a different lucee-server configuration in our production/stage/dev environments solely because we don't have the same drive letter or store our code in the same directory. I have an environment variable setup for my Tomcat windows service that has this path defined, but I unfortunately only seem to be able to reference it in my Tomcat configs.  If anyone has any workaround they can think to achieve this on the stable version of Lucee or an alternative approach (other than using the Administrator web interface or maintaining multiple configs), please let me know. I will keep digging for some mechanism on my end. 

Thanks.

Pete Freitag

unread,
Aug 5, 2015, 12:42:27 PM8/5/15
to lu...@googlegroups.com
You should still be able to get the environment variables in versions prior to 5, they are available to Java in the java.lang.System class via the getenv() method. I think he was saying the ability to reference them from lucee config files was only going to be in 5.


So while you may not be able to reference them in the config files you should still be able to configure the server at runtime using them.

--
Pete Freitag
https://foundeo.com/ - ColdFusion Consulting & Products
http://hackmycf.com - CFML Server Security Scanner


Scott Smith

unread,
Aug 5, 2015, 12:49:58 PM8/5/15
to lu...@googlegroups.com
Yeah I did figure out how to get at them from within the application, but I then realized we rely on a mapping for our applications to extend some "base" components like a base application and some others, so by the time I can access this variable in the app, it is too late.  I'd have to have that mapping configured in the XML. So far I take it that if I am not moving to 5, I will have no choice but to manage at least the one mapping with a different setting in every environment.  

Reply all
Reply to author
Forward
0 new messages