在Web-Inf文件夹下创建jetty-web.xml,用来配置数据库驱动信息。 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure id="wac" class="org.mortbay.jetty.webapp.WebAppContext"> <New id="TDS" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>TDS</Arg> <Arg> <New class="oracle.jdbc.pool.OracleConnectionPoolDataSource"> <Set name="URL">jdbc:oracle:thin:@10.2.12.100:1521:orcl</Set> <Set name="User">tuser</Set> <Set name="Password">tpas</Set> </New> </Arg> </New> </Configure> 其他类型配置可参看:http://docs.codehaus.org/display/JETTY/JNDI