Re: jndi.properties in Tomcat 5.5.23 ??

2007-10-17 Thread Konstantin Kolinko
I do not have recent experience with JNDI, so the following are just my guesses, trying to help. May be someone will provide a better answer, or You will be able to find it by yourself. Thus said, it looks to me that what you are trying is not possible. As seen from [1], Tomcat 5.5 already has s

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 jndi properti

Re: jndi.properties

2006-05-03 Thread Sreenivasulu R Gaddam
> > > > > > > >-Original 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 > > > >

Re: jndi.properties

2006-05-03 Thread David Smith
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(); >==

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
Probably a Java expert could help more, but I think you can use a ResourceBundle (and place the properties in your package with your java class files) to retrieve it or even a URL to load the properties file. URL method psuedo code: Properties props = new Properties(); URL url = new URL(http://lo

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
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, abdurrahman sahin <[EMAIL PROTECTED]> wrote: i think , it is actully r

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(CONFIG_FILE);