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 for sponsored feature development
Table of Contents
java:comp/env lookups in webapps. This is an optional
feature for which you need to do some setup.
If you are using the standard distribution of Jetty, you must enable the jndi module to obtain jetty’s jndi implementation, and the plus module which provides classes for interacting with jndi. As the plus module depends on the jndi module, you only need to enable the plus module to enable both. 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 $JETTY_HOME/start.jar --add-to-startd=plus
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.
If you have extra jars associated with your jndi resources, for example
a database driver jar, and you haven’t made a custom
module for it, you can put the jars into your
ext/ directory. You will then
need to enable the ext module to ensure the jars in the
directory are on the classpath. 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 $JETTY_HOME/start.jar --add-to-startd=ext