tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes JndiServlet.java
Date Thu, 08 Nov 2001 22:02:16 GMT
remm        01/11/08 14:02:16

  Modified:    webapps/examples/WEB-INF/classes JndiServlet.java
  Log:
  - Add an example of using the global JNDI resources.
  
  Revision  Changes    Path
  1.2       +9 -1      jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/JndiServlet.java
  
  Index: JndiServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/JndiServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JndiServlet.java	2000/11/02 06:16:16	1.1
  +++ JndiServlet.java	2001/11/08 22:02:16	1.2
  @@ -1,4 +1,4 @@
  -/* $Id: JndiServlet.java,v 1.1 2000/11/02 06:16:16 remm Exp $
  +/* $Id: JndiServlet.java,v 1.2 2001/11/08 22:02:16 remm Exp $
    *
    */
   
  @@ -43,6 +43,14 @@
               Object value = ctx.lookup("java:/comp/env/maxExemptions");
               out.println("Simple lookup test : ");
               out.println("Max exemptions value : " + value);
  +        } catch (NamingException e) {
  +            out.println("JNDI lookup failed : " + e);
  +        }
  +        
  +        try {
  +            Object value = ctx.lookup("java:/comp/env/linkToGlobalResource");
  +            out.println("Resource link test : ");
  +            out.println("Link value : " + value);
           } catch (NamingException e) {
               out.println("JNDI lookup failed : " + e);
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message