Then deploy a your_webapp_name_here.xml file along with your app that contains the context settings.
Chris McCormack -----Original Message----- From: Jonathan Wright [mailto:[EMAIL PROTECTED] Sent: 11 November 2004 23:22 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: JNDI Craig, Thanks for the prompt reply. I have in the past set up DataSources in Tomcat's server-config.xml. However, due to the nature of our production environment I don't want to edit this file. It's relatively important that my web apps are completely self contained. Jonathan Wright ----- Original Message ----- From: "Craig McClanahan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, November 12, 2004 11:57 AM Subject: Re: JNDI > On Fri, 12 Nov 2004 11:46:22 +1300, Jonathan Wright > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Just a quick question about JNDI in a Struts setting. I want to reduce the > > dependencies between objects in my app. Some objects that are not servlet > > aware need access to the ServletContext and DataSources. However rather than > > complicating matters and increasing the number of arguments I need to pass > > around I'm thinking of putting references to DataSources and the > > ServletContext into a JNDI context. > > > > Which JNDI SPI would you recommend for a simple object registry/store? What > > are the issues regarding the Referenceable interface? > > Why not use the JNDI naming context provided by your container? You > shouldn't have to be worried about implementing this -- just configure > the JNDI resources that you want to make available to your > application. > > For example, the instructions for using the naming context provided by Tomcat: > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html > > and specific info about using a data source provided by Tomcat: > > http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how to.html > > Other servers will have their own mechanisms for configuring these things. > > Craig > > --------------------------------------------------------------------- > 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] *********************************************** This e-mail and its attachments are confidential and are intended for the above named recipient only. If this has come to you in error, please notify the sender immediately and delete this e-mail from your system. You must take no action based on this, nor must you copy or disclose it or any part of its contents to any person or organisation. Statements and opinions contained in this email may not necessarily represent those of Littlewoods. Please note that e-mail communications may be monitored. The registered office of Littlewoods Limited and its subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is 262152. ************************************************ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]