tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "srinath narasimhan" <srin...@nuviewinc.com>
Subject RE: Another JNDI Configuration issue
Date Thu, 09 Jan 2003 21:05:32 GMT
I have tried that. It still gives me the same error.
Thanks
Srinath.



-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Wednesday, January 08, 2003 21:01
To: Tomcat Users List
Subject: Re: Another JNDI Configuration issue




On Wed, 8 Jan 2003, srinath narasimhan wrote:

> Date: Wed, 8 Jan 2003 18:17:50 -0500
> From: srinath narasimhan <srinath@nuviewinc.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> Subject: Another JNDI Configuration issue
>
>
>
> I am running tomcat 4.1.12 on Windows 2000 with jdk 1.4.1. I have
configured
> my datasource as a JNDI resource. This works just fine.
> I am trying to deploy my application on linux ( jdk 1.4.1 and tomcat
> 4.1.12 ), when I try to access the JNDI resource I get a exception :
>
> "Name java:comp is not bound in this Context".
> In the log, I do see the message about creating a JNDI context. But I
don't
> know why would this say "java:comp" is not found exception ?
>
> The Jsp code is simple
>
> 	Context initCtx = new InitialContext();
> 	out.print("<br/>");
> 	out.print(initCtx.lookup("java:comp").toString());
> 	out.print("<br/>");
>
> This works on the windows 2000 deployment, but not on the linux box.
>

Dunno if its the only problem, but you really want:

  out.print(initCtx.lookup("java:comp/env").toString());

in order to get the environment context for your webapp.  To optimize
performance, there is not a requirement that the "java:comp" context
actually exist.

Craig


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


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


Mime
View raw message