jetty-env.xml needs to be in WEB-INF
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://www.eclipse.org/jetty/configure.dtd">
<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
<New class="org.eclipse.jetty.plus.jndi.EnvEntry">
<Arg>jdbc/jndiname</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleDataSource">
<Set name="user">DBUSER</Set>
<Set name="password">DBPASSWORD</Set>
<Set name="URL">jdbc:oracle:thin:@URL</Set>
</New>
</Arg>
</New>
</Configure>
pom.xml:
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
....
applicationContext:
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/jdbc/jndiname" />
</bean>