Providing my own default lucee web configuration template

229 views
Skip to first unread message

Jesse Shaffer

unread,
Mar 3, 2015, 11:39:34 AM3/3/15
to lu...@googlegroups.com
I'm setting up a baseline server configuration for our projects, and I want to provide a customized default web.xml template that is used in initializing a new web app (not Tomcat's web.xml, but the one packaged as {lucee.jar}/resource/config/web.xml).

I'm in the process of trying this, but I wanted to check to see if there was a better way.  I plan on modifying my catalina.properties' common.loader directive from ${lucee.home}/*.jar to ${lucee.home}/resource/config/*.xml,${lucee.home}/*.jar.  I'm assuming it will pick up my custom web.xml file if it exists, otherwise use the one packaged in the lucee.jar.  Is this correct?  My understanding is not the best concerning java-classloading and its order of precedence, and our resident java guru is out of the office today.

It would be nice if there were an option to config a custom path to the web.xml template from within lucee-server.xml...

Jesse Shaffer

unread,
Mar 3, 2015, 2:24:53 PM3/3/15
to lu...@googlegroups.com
So, first off, I was wrong, the web.xml template is not packaged in the lucee.jar, but the current patch file (lucee-server/patches/*.lco).

I have tried the following:
  • Add ${lucee.home}/resource/config/*.xml to the tomcat classloader
    • Tomcat fails to start, whether any xml files exist or not.
  • Modified the above path to ${lucee.home}/resource/config/web.xml
    • Tomcat starts, with or without a web.xml file existing
    • However, even if the web.xml file exists at tomcat startup, it does not appear to be using that file instead of the one packaged with the current patch.
It may just be that it is not possible to accomplish my goal as it is.

Michael Offner

unread,
Mar 5, 2015, 1:44:08 AM3/5/15
to lu...@googlegroups.com
I tried to understand what you plan to do, but I cannot follow. Can you please explain in more details.
To the role of the configuration, the web.xml file is a file from tomcat itself that defines the lucee servlet and can provide optional details about the config location.

Micha
--
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/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jesse Shaffer

unread,
Mar 5, 2015, 6:38:09 AM3/5/15
to lu...@googlegroups.com
I'll try.  I'm not worried about Tomcat's web.xml, I'm wanting to provide my own version of:

That file is used as a template to initialize a new <app>/WEB-INF/lucee/lucee-web.xml.cfm.

Specifically, I'm wanting to provide my own version of that file that does not include the mapping to lucee-context.lar, as I configured a central mapping for it in my lucee-server.xml.  I was hoping to find a way to do it without having to modify it in the patch file (4.5.1.005.lco for instance).

What happens is, if I deploy a non-CFML WAR file into a Tomcat container configured to run Lucee, it generates the /WEB-INF/lucee/ folder and everything underneath, including the lucee-web config with a mapping to the lucee-context.lar.  I then cannot undeploy the webapp (on Windows) without stopping Tomcat because the .lar file is being held open by the Tomcat process.  I have to assume I cannot make changes to the non-CFML WAR file to define a lucee-web config.  I also do not want to make changes to the patch file because that means I cannot use the Lucee update provider.

Hope that makes more sense,

Jesse

On Thursday, March 5, 2015 at 12:44:08 AM UTC-6, Micha wrote:
I tried to understand what you plan to do, but I cannot follow. Can you please explain in more details.
To the role of the configuration, the web.xml file is a file from tomcat itself that defines the lucee servlet and can provide optional details about the config location.

Micha

On Tuesday, March 3, 2015, Jesse Shaffer <dajest...@gmail.com> wrote:
So, first off, I was wrong, the web.xml template is not packaged in the lucee.jar, but the current patch file (lucee-server/patches/*.lco).

I have tried the following:
  • Add ${lucee.home}/resource/config/*.xml to the tomcat classloader
    • Tomcat fails to start, whether any xml files exist or not.
  • Modified the above path to ${lucee.home}/resource/config/web.xml
    • Tomcat starts, with or without a web.xml file existing
    • However, even if the web.xml file exists at tomcat startup, it does not appear to be using that file instead of the one packaged with the current patch.
It may just be that it is not possible to accomplish my goal as it is.

--
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+unsubscribe@googlegroups.com.

Michael Offner

unread,
Mar 6, 2015, 2:26:21 AM3/6/15
to lucee
Thanks for the clarification, makes sense now. 
The only solution I can think of atm is to set that lucee is checking for changs in the file automactly in the lucee-server.xml.
and then rewrite the file.
We could also think of the possibility of a setting for the tomcat web.xml that influence if Lucee generates an environment for new contexts or not, so like a pattern that defines if lucee jumps in or not.
With Lucee 5 we plan to move the admin to a extension what will solve the problem.

Micha


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.
Reply all
Reply to author
Forward
0 new messages