Jetty Logo
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 12. Configuring JNDI

Table of Contents

Quick Setup
Detailed Setup
Working with Jetty JNDI
Configuring JNDI
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, and want to enable JNDI for all your webapps, edit the $JETTY_HOME/start.ini file and uncomment the following two lines:


#===========================================================
# Annotations JNDI JAAS processing
#-----------------------------------------------------------
OPTIONS=plus
etc/jetty-plus.xml
# OPTIONS=annotations
# etc/jetty-annotations.xml
#===========================================================   

    

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!