[jetty-user] Why is jetty-env.xml being ignored?
Ed Hillmann <[email protected]> Fri, 27 Jan 2012 14:30:08 +1000
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <CAKbR2FPRy6CNeSaZXJdbTJMA=c4iLLkA2NtSoFp8UDMo69esMw@mail.gmail.com> |
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