tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 62786] Post Resources ignored in server.xml when Resources tag present in context.xml
Date Mon, 08 Oct 2018 13:26:00 GMT

--- Comment #2 from Mark Thomas <> ---
When a Context is defined in a dedicated file the order of events is:
a) Create Context object
b) configure from conf/context.xml
c) update configuration from dedicated file

When a Context is defined in server.xml the order of events is:
1) Create Context object
2) configure from server.xml
3) update configuration from conf/context.xml

Ideally, we want to swap 2) and 3).

Note: - b, c and 3 happen in ContextConfig
      - Defining Contexts in server.xml is strongly discouraged
      - This problem is not limited to Resources. It applies equally to
        any Context configuration.

Re-ordering 2) and 3) is tricky as 1) and 2) happen in the digester while
server.xml is being parsed. Changing the order is possible but would be very

It is already possible to disable 3) by setting override="true" in the Context
defined in server.xml (although that does mean all settings from
conf/context.xml will be ignored).

We could change the default of override for Context's defined in server.xml but
I am concerned that that will break existing configurations. E.g. where
resources are defined only in conf/context.xml to make common resources
available to multiple web applications.

I'm currently leaning towards addressing this issue with a documentation

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message