Hi Vaneet
Thanks for the reference. I'm a little confused though, what are you referring to in this page that I should read? I can't see anything that explains how the context element is used.
Thanks Andrew
Vaneet Sharma wrote:
U need to read this page
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/deployment.html
Have fun reading
Vaneet
-----Original Message-----
From: Andrew Watters [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 06, 2005 6:14 PM
To: Tomcat Users List
Subject: Re: How to read JNDI resources?
Thank you, I appreciate your reply. I didn't have a context entry so I added a minimal one (copied from the /examples one) before proceeding further as shown below.
<Context path="/xxx" docBase="xxx" debug="0" reloadable="true" crossContext="true" />
Unfortunately tomcat doesn't start now. I get a 'Document base C:\Development\Java\jakarta-tomcat-4.1.31\webapps\xxx does not exist or is not a readable directory'
So I added a direcory xxx. Now tomcat starts ok but it doesn't unpack the xxx.war. Again I'm probably making some very simple mistake but can't see the problem or an answer in the docs or by googling...
Mark Thomas wrote:
You need to include a <ResourceLink> element in your context.
Mark
Andrew Watters wrote:
Using tomcat 4.3.1 I have included the following in server.xml <GlobalNamingResources>
<Environment name="config_file" type="java.lang.String"
value="test"/>
</GlobalNamingResources>
In a servlet loaded on startup I try to read in the property InitialContext ic = new InitialContext(); Context ctx = (Context) ic.lookup("java:comp/env"); String configFilename = (String)(ctx.lookup("config_file"));
This code throws a NamingException. Where have I gone wrong?
Thanks Andrew
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Vaneet Sharma executive manager iDeasTank Limited an iwg business dolphins' court po 388 valletta, m-malta/europe mobile: +356 9943 8263 skype: CALLVANEET fax: +356 9952 8888 phone: +356 9942 8888
[EMAIL PROTECTED] call me on www.skype.com - my ID is CALLVANEET
Want a signature like this? - www.plaxo.com\signature
iwg is a global e-mobile company creating, building and growing new businesses. iwg founders are pioneers in creating multi-billion dollar mobile and Internet businesses in Europe, Asia and the US.
www.iWG.info www.countryprofiler.com/iWG www.visitmalta.com www.mfc.com.mt
Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]