Following Wicket 1.5\'s lead, I\'m 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 co
Put the following into src/test/jetty/jetty-env.xml:
jdbc/mydatasource
jdbc:mysql://localhost/mydatabase?characterEncoding=utf8
username
password
Then modify Start.java
to define the following properties:
System.setProperty("java.naming.factory.url.pkgs", "org.eclipse.jetty.jndi");
System.setProperty("java.naming.factory.initial", "org.eclipse.jetty.jndi.InitialContextFactory");
And add the following configuration to the WebAppContext:
EnvConfiguration envConfiguration = new EnvConfiguration();
URL url = new File("src/test/jetty/jetty-env.xml").toURI().toURL();
envConfiguration.setJettyEnvXml(url);
bb.setConfigurations(new Configuration[]{ new WebInfConfiguration(), envConfiguration, new WebXmlConfiguration() });
Full details on my blog.