Servlets.com

Home

What's New?

com.oreilly.servlet

Servlet Polls

Mailing Lists

List Archives

Servlet Engines

Servlet ISPs

Servlet Tools

Documentation

Online Articles

The Soapbox

"Java Servlet
Programming,
Second Edition"

"Java Enterprise
Best Practices"

Speaking & Slides

About Jason

XQuery Affiliate

Advertising Info

The Book
Chapter 12 Examples from Java Servlet Programming, 2nd Ed

  • 12-1: Snooping the java:comp/env context

Examples from other chapters:

Example 12.1: Snooping the java:comp/env context
This servlet displays all its J2EE environment entries, using the JNDI API to browse the java:comp/env context. All entries are placed by the server into the java:comp/env context. If you’re new to JNDI, you can think of this as a URL base or filesystem directory. The java:comp/env context is read-only and unique per web application, so if two different web applications define the same environment entry, the entries do not collide. This feature is only available to servers supporting J2EE. Jetty (which we're using here) does not support J2EE, so this will generate an error.
    • Try it (generates an error because Jetty is not a J2EE server)
    • Source

 


Home   com.oreilly.servlet   Polls   Lists   Archives
Engines   ISPs   Tools   Docs   Articles   Soapbox   Book

Copyright © 1999-2005 Jason Hunter
Privacy Policy

webmaster@servlets.com
Last updated: March 1, 2009