Hi,
I have some problems with a JNDI look up.
I have my classes to in a web app, but in a jar in tomact common/lib, I 
put my jndi resourse in the GlobalNamingResources in the server.xml and 
I use this code to access the context.

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
ds = (DataSource)envCtx.lookup(datasource);

I got the error:
initialization failed : Name comp is not bound in this Context

it doesn't find the context..because it's out of a webapp..
Does somebody  know how to call the global context from the code?
is it possible to get access to the context outside a webapp?

Thanks,


-- 
Luca Zago
Senior IT Developer
_____________________________________________________

E-TREE S.p.a.  Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107
fax   +39.0422.310888
http://www.e-tree.com          http://www.webanana.com
_____________________________________________________


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to