Re: jndi.properties in Tomcat 5.5.23 ??

2007-10-17 Thread Konstantin Kolinko
some meaningful configuration for new InitialContext(), thus your jndi.properties will overwrite/conflict with that one. [1]: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html Thus, you may want to explicitly specify the set of properties, using new InitialContext(Hashtable

jndi.properties in Tomcat 5.5.23 ??

2007-10-16 Thread Robert Upshall
I have an existing application that accesses JBoss with the jndi info defined in the jndi.properties file. I want to make a web enabled version of that application. I have copied the access code from my application into my servlet. When I run the servlet I get

Re: Tomcat, ActiveMQ, 'jndi.properties' file problem

2006-06-02 Thread Hadraba Petr
Hi, sorry, I forgot to note, that the resources in the context.xml and web.xml files are replacements for the jndi.properties. I'm using Tomcat's build-in JNDI. It looks like you're using one Queue with the name listenerDestination. So, try the following: META-

Re: Tomcat, ActiveMQ, 'jndi.properties' file problem

2006-06-02 Thread Maciej Łabędzki
Hadraba Petr napisał(a): Hi Maciej, I'm connecting from Tomcat to ActiveMQ with this configuration: Thx, but how it corresponds to my jndi.properties file? How should I form my configuration files (context.xml, web.xml)? jndi.properties: --- java.naming.factory.in

Re: Tomcat, ActiveMQ, 'jndi.properties' file problem

2006-06-02 Thread Hadraba Petr
e, it helps... PETR On 6/2/06, Maciej Łabędzki <[EMAIL PROTECTED]> wrote: Hi, i develope my web application using ActiveMQ and run it under Apache Tomcat 5. There is a problem - the 'jndi.properties' file seems to be invisible, although it is placed on class path. Has anybo

Tomcat, ActiveMQ, 'jndi.properties' file problem

2006-06-02 Thread Maciej Łabędzki
Hi, i develope my web application using ActiveMQ and run it under Apache Tomcat 5. There is a problem - the 'jndi.properties' file seems to be invisible, although it is placed on class path. Has anybody met such a proble

Re: jndi.properties

2006-05-03 Thread Feris Thia
ic It works ... This is the best approach that I may Used Thanks Sreeni .. On 5/4/06, Sreenivasulu R Gaddam <[EMAIL PROTECTED]> wrote: Instead of hardcoding, you can define a variable in the web.xml as jndiproperties relativepathtowebapp/jndi.properties

Re: jndi.properties

2006-05-03 Thread Sreenivasulu R Gaddam
Instead of hardcoding, you can define a variable in the web.xml as jndiproperties relativepathtowebapp/jndi.properties jndi properties and get the path name from the servlet context real path as follows. String propsFilePath = ServletContext.getRealPath

Re: jndi.properties

2006-05-03 Thread David Smith
Or better yet, use ServletContext#getResourceAsStream() as follows: Properties jndiProps = new Properties() ; try { jndiProps.load( getServletContext().getResourceAsStream( "/any/webapp/relative/folder/jndi.properties" ) ) ; } catch ( IOException ioe ) { // Log and handle error }

Re: jndi.properties

2006-05-03 Thread Feris Thia
Hi Tim, I've read the article. I think I get all the ideas. In Tomcat should be in classloader path right ? like in lib or classes folder ? I'll try that. Thanks On 5/3/06, Tim Lucia <[EMAIL PROTECTED]> wrote: No. It has to be under a location accessible via the classpath. The JSPs a

Re: jndi.properties

2006-05-03 Thread Feris Thia
ic... i think this is what i need. thx, feris On 5/3/06, abdurrahman sahin <[EMAIL PROTECTED]> wrote: i never tried it with default ctor, used it as new InitialContext(jndiProperties); using DirectoryFinding methods may help you like below. String realPath = request.getRealPath(request.getCont

RE: jndi.properties

2006-05-03 Thread abdurrahman sahin
Message- From: Feris Thia [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 03, 2006 3:56 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: jndi.properties Ic so we cannot just load it from the directory where jsp are and use this code

Re: jndi.properties

2006-05-03 Thread Marc Farrow
> private static final String CONFIG_FILE="resources/jndi.properties"; > FileInputStream fis = new FileInputStream(CONFIG_FILE); > myProperties.load(fis); > > -- Regards, Feris PT. Putera Handal Indotama JL. KH. Moh. Mansyur No. 11 Blok B.8-12 T

RE: jndi.properties

2006-05-03 Thread Tim Lucia
: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: jndi.properties Ic so we cannot just load it from the directory where jsp are and use this code ? = InitialContext jndiContext = new InitialContext(); = On 5/3/06

Re: jndi.properties

2006-05-03 Thread Feris Thia
ctully related to where you are looking for. i think you can put it anyware as long as the diretory you put it is accessible. http://asahin.net private static final String CONFIG_FILE="resources/jndi.properties"; FileInputStream fis = new FileInputSt

RE: jndi.properties

2006-05-03 Thread abdurrahman sahin
i think , it is actully related to where you are looking for. i think you can put it anyware as long as the diretory you put it is accessible. http://asahin.net private static final String CONFIG_FILE="resources/jndi.properties"; FileInputStream fis = new FileInputStream(C

jndi.properties

2006-05-03 Thread Feris Thia
Hi, I try to put jndi.properties under the same folder with JSP page. But it's not working. Where should I put it ? -- Regards, Feris PT. Putera Handal Indotama JL. KH. Moh. Mansyur No. 11 Blok B.8-12 Telp. +62-21-631 6688 (Hunting) Fax. +62-21-6330211 Jakarta (10140) - INDO