Following the example of Wicket 1.5, I am converting a project from Jetty 6.1.25 to 7.5.0.v20110901. My existing Start.java contains the following setup, which I use to configure JNDI:
EnvConfiguration envConfiguration = new EnvConfiguration(); URL url = new File("src/main/webapp/WEB-INF/jetty-env.xml").toURI().toURL(); envConfiguration.setJettyEnvXml(url); bb.setConfigurations(new Configuration[]{new WebInfConfiguration(), envConfiguration, new org.mortbay.jetty.plus.webapp.Configuration(), new JettyWebXmlConfiguration(), new TagLibConfiguration()});
Then my jetty-env.xml has the following:
<Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jdbc/myapp</Arg> <Arg> <New class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <Set name="driverClassName">com.mysql.jdbc.Driver</Set> <Set name="url">jdbc:mysql://localhost/myapp?characterEncoding=utf8</Set> <Set name="username">username</Set> <Set name="password">password</Set> </New> </Arg> </New> </Configure>
This works fine on Jetty 6, but in 7, org.mortbay.jetty.plus.webapp.Configuration doesn't seem to exist (or maybe I'm missing a Jar).
Can someone give me some guidance on configuring JNDI with Jetty 7?
java jetty wicket jndi
George Armhold
source share