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
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
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-
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
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
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
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
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
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
}
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
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
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
> 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
: 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
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
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
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
17 matches
Mail list logo