Providing my own default lucee web configuration template

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…

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.

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.

MichaOn Tuesday, March 3, 2015, Jesse Shaffer <@Jesse_Shaffer> 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
<javascript:_e(%7B%7D,‘cvml’,‘lucee%2Bunsubscribe@googlegroups.com’);>.
To post to this group, send email to lucee@googlegroups.com
<javascript:_e(%7B%7D,‘cvml’,‘lucee@googlegroups.com’);>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com
https://groups.google.com/d/msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

I’ll try. I’m not worried about Tomcat’s web.xml, I’m wanting to provide
my own version of:
https://bitbucket.org/lucee/lucee/src/3282dd83cc4d/lucee-java/lucee-core/src/resource/config/web.xml?at=master

That file is used as a template to initialize a new
/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,

JesseOn 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 <javascript:>> 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.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com
https://groups.google.com/d/msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

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.
https://bitbucket.org/lucee/lucee/wiki/tips_and_tricks_Check_for_changes
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.

MichaOn Thu, Mar 5, 2015 at 12:38 PM, Jesse Shaffer <@Jesse_Shaffer> wrote:

I’ll try. I’m not worried about Tomcat’s web.xml, I’m wanting to provide
my own version of:

Bitbucket

That file is used as a template to initialize a new
/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.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com
https://groups.google.com/d/msgid/lucee/e3815e9b-b4e1-4bce-b585-d7da32a65cb1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/d59691e8-ad5d-4118-bff2-5972643bf89d%40googlegroups.com
https://groups.google.com/d/msgid/lucee/d59691e8-ad5d-4118-bff2-5972643bf89d%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.