RE: resource defined in web.xml has null attributes but server.xml is ok

2004-11-10 Thread Steve Kirk
You don't say what version. I am aware that things are changing in this area in 5.5.x so what I'm saying possibly applies to 5.0.x only. Check the docs if you have a different version. In 5.0.x, you have to put resource-ref in web.xml if you want to be compliant with the servlet spec. If you do

Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Peter Johnson
Hi, You need both. You define the resource in the context of the app and then link to the resource from the app. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html PJ Nishant Deshpande wrote: When I set up a db resource in web.xml and create it, for some reasons

Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Nishant Deshpande
So - I cannot *not* define a resource at the server level (i.e. not touch the server.xml or any other server configuration file) and only define it in the app configuration files - i.e. web.xml ? It seems like thats what you are saying below - just want to be sure I understand clearly. Thanks

Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Peter Johnson
Almost, you must define it in a context usually app specific rather than DefaultContext. The bit that makes it almost is that a context (if not DefaultContext) can be defined in the server.xml *or* conf/service/engine/app.xml e.g. catalina home/conf/Catalina/localhost/test.xml If deploying as

Re: resource defined in web.xml has null attributes but server.xml is ok

2004-11-08 Thread Nishant Deshpande
Ok got it. If I could read property I would have saved myself a lot of time. Just to emphasise for anyone else looking at this thread.. a context (if not DefaultContext) can be defined in the server.xml *or* conf/service/engine/app.xml The OR is important - i was defining a context for the