Is there another place I can put this file on a Jetty server machine?
The official JNDI page puts it like this:
There are 3 places in which you can
define naming entries:
- jetty.xml
- WEB-INF/jetty-env.xml
- context xml file
Naming entries defined in a
jetty.xml
file will generally be
scoped at either the jvm level or the
Server level. Naming entries in a
jetty-env.xml
file will generally be
scoped to the webapp in which the file
resides, although you are able to
enter jvm or Server scopes if you
wish, that is not really recommended.
In most cases you will define all
naming entries that you want visible
to a particular Server instance, or to
the jvm as a whole in a jetty.xml
file. Entries in a context xml file
will generally be scoped at the level
of the webapp to which it applies,
although once again, you can supply a
less strict scoping level of Server or
jvm if you want.
Use jetty.xml
to configure things "outside" the webapp.
A follow up question: How about within my Maven WAR module...how should I deal with this file so that I can use the Maven jetty plugin for development, but not have the file end up in the WAR?
Use the jettyConfig parameter of the Maven Jetty Plugin:
jettyConfig
Optional. The location of a jetty.xml file that will be applied in addition to any plugin configuration parameters. You might use it if you have other webapps, handlers etc to be deployed, or you have other jetty objects that cannot be configured from the plugin.