Jetty Logo
Version: 9.2.3.v20140905
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Chapter 11. Configuring JNDI

Table of Contents

Quick Setup
Working with Jetty JNDI
Configuring JNDI
Using JNDI with Jetty Embedded
Datasource Examples

Jetty supports java:comp/env lookups in webapps. This is an optional feature for which you need to do some setup.

Quick Setup

If you are using the standard distribution of Jetty, you must enable the jndi module, if it is not already enabled via a transitive dependency from another module. Assuming you have jetty installed in /opt/jetty, and you have made a jetty base in /opt/jetty/my-base, do:

cd /opt/jetty
cd my-base
java -jar ../start.jar --add-to-startd=jndi
    

You can now start Jetty and use JNDI within your webapps. See Using JNDI for information on how to add entries to the JNDI environment that Jetty can look up within webapps.

See an error or something missing? Contribute to this documentation at Github!(Generated: 2014-11-26T01:00:26-08:00)