On 01/08/18 20:22, Francesco Viscomi wrote: > Hi all, > I'm using tomcat 8.5 and I need to configure a datasource in tomcat; > > If a configure it in the contex.xml file under conf directory using the tag > <resource> everythings goes well. > > But if I configure it in the server.xml file under the conf directory, a > message tell me that the resource that i have called jdbc/dataSource in not > bound in this context; > > Now I'm asking why, Tomcat cannot detect that the datasource is configured > in the server.xml file? > And why i should have to configure the resource in the context.xml under > the conf direcory?
If you define a resource globally in server.xml you have to explicitly link it to the web application(s) you want to have access to it. Global resources are deliberately not visible to all web applications as in many installations that would create security concerns. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org