Re: [jetty-user] Why is jetty-env.xml being ignored?
Jan Bartel <[email protected]> Fri, 27 Jan 2012 16:28:34 +1100
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CALg=VpiPqKk_9Ex1OWehwR71GT8Y+v2n4gBw8Q82jmT0GhK1=Q@mail.gmail.com> |
You really should transition if possible to jetty-7, as jetty-6 is no longer being actively developed. The jetty philosophy is to provide a lot of functionality as options. In the distro, just the basics are enabled. In the jetty-maven-plugin, we have enabled a lot more by default. Have a read of the pages on how to enable jetty-plus features for jetty-6 here: http://docs.codehaus.org/display/JETTY/JNDI And for jetty-7 here: http://wiki.eclipse.org/Jetty/Feature/JNDI Jan On 27 January 2012 15:30, Ed Hillmann <[email protected]> wrote: > Hi. I'm seeing some behaviour which I cannot explain, and hope that someone > can. > > I'm building out a Web application, and I'm using the Maven Jetty Plugin to > test the web application. As part of the web application, I've defined the > file jetty-env.xml in the WEB-INF directory which defines some JNDI values. > And it all works great. > > Now, I'm playing around with how we deploy this code into production > environments. This is setting up a Jetty server manually (using contexts, > etc) instead of using the Jetty Maven plugin. And, no matter what I do, the > contents of the jetty-env.xml is never read, thus the application fails in a > spectacular fashion. > > I've tried to piece together why this is, but I don't know Jetty well enough > to figure this out. The best I can come up with is using JConsole to see > how the server is deployed and running. I've noticed that the webappcontext > objects are different: where it works, it's using a > Jetty6PluginWebAppContext; where it doesn't, it's using a WebAppContext > instance. > > Is there anything I should be configuring in Jetty which ensures that the > jetty-env.xml file is read when deploying a web application from a WAR > file? I'm using version 6.1.25 > > Thanks for any help, > Ed --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email