Re: Using JNDI. java:comp .... not defined?
I am using 5.5.20 On Oct 22, 2007, at 10:25 PM, foo shyn wrote: Hmm which Tomcat version you are using? For Tomcat 4.1 AFAIK you have to put a link in your application's web.xml to the global resources in order for your application to access it. HTH FooShyn Mark Thomas wrote: Andrei Tchijov wrote: when I am trying to do " ... initCtx.list( "java:comp/ env" ); ...". Do I need to do anything to "enable" JNDI? Does it make any difference that I am trying to use JNDI from Valve? Probably. I haven't looked at the code but I would not expect this to work. Test it in a JSP to see if it works there. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JNDI. java:comp .... not defined?
Hmm which Tomcat version you are using? For Tomcat 4.1 AFAIK you have to put a link in your application's web.xml to the global resources in order for your application to access it. HTH FooShyn Mark Thomas wrote: Andrei Tchijov wrote: when I am trying to do " ... initCtx.list( "java:comp/env" ); ...". Do I need to do anything to "enable" JNDI? Does it make any difference that I am trying to use JNDI from Valve? Probably. I haven't looked at the code but I would not expect this to work. Test it in a JSP to see if it works there. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JNDI. java:comp .... not defined?
Andrei Tchijov wrote: > when I am trying to do " ... initCtx.list( "java:comp/env" ); ...". Do I > need to do anything to "enable" JNDI? Does it make any difference that I > am trying to use JNDI from Valve? Probably. I haven't looked at the code but I would not expect this to work. Test it in a JSP to see if it works there. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using JNDI. java:comp .... not defined?
Hi, I guess I am missing something very very basic, but I can not see what it is. I am trying to make some resources available via JNDI. I have put appropriate "GlabalNamingResources/Resource" into my server.xml ( and I think I did it properly - at least tomcat is not complaining about ). The only problem is that I am getting javax.naming.NameNotFoundException: Name comp is not bound in this Context at org.apache.naming.NamingContext.list(NamingContext.java:344) at org.apache.naming.NamingContext.list(NamingContext.java:367) at org.apache.naming.SelectorContext.list (SelectorContext.java:306) at javax.naming.InitialContext.list(InitialContext.java:395) when I am trying to do " ... initCtx.list( "java:comp/env" ); ...". Do I need to do anything to "enable" JNDI? Does it make any difference that I am trying to use JNDI from Valve? Any help will be highly appreciated. Andrei - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]