Demo Home Source Jetty Project Home Documentation Commercial Support
Demo Web Application Only - Do NOT Deploy in Production

Eclipse Jetty JNDI Demo Webapp

This is a demo webapp for the Eclipse Jetty HTTP Server and Servlet Container. It was added into your $JETTY_BASE/webapps directory.

It shows how to configure and lookup resources such as javax.sql.DataSource, a JTA transaction manager and a java.mail.Session in JNDI.

Preparation

To use JNDI in a base jetty instance enable the jndi module:

     $ cd $JETTY_BASE
     $ java -jar $JETTY_HOME/start.jar --add-module=jndi
         

The jetty demo module pre-enables JNDI along with some mock resources used by this demo.

Execution

Click Test to check the runtime lookup of the JNDI resources.