Finally after long struggle I could get the datasource things running. The things are working when i specified all into GlobalResources and GlobalContext inside server.xml My server.xml is something like below.. ----------------------------------------- <GlobalNamingResources> <Resource auth="Container" name="mspool" type="javax.sql.DataSource"/> <ResourceParams name="mspool"> <parameter> <name>url</name> <value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sbcs</value> </parameter> <parameter> <name>maxIdle</name> <value>30</value> </parameter> <parameter> <name>maxActive</name> <value>100</value> </parameter> <parameter> <name>driverClassName</name> <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> </parameter> <parameter> <name>maxWait</name> <value>10000</value> </parameter> <parameter> <name>username</name> <value>manisha</value> </parameter> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <parameter> <name>selectMethod</name> <value>cursor</value> </parameter> <parameter> <name>password</name> <value>manisha</value> </parameter> <parameter> <name>removeAbandoned</name> <value>true</value> </parameter> <parameter> <name>removeAbandonedTimeout</name> <value>60</value> </parameter> <parameter> <name>logAbandoned</name> <value>true</value> </parameter> </ResourceParams> </GlobalNamingResources> ....... .... <Host appBase="webapps" name="localhost"> <DefaultContext className="org.apache.catalina.core.StandardDefaultContext"> <ResourceLink global="mspool" name="mspool" type="javax.sql.DataSource"/> </DefaultContext> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> </Host> .... I did not change anything inside Web.xml as everything is inside Global. But i do not want it inside global naming resources / default context - but i want it only specific to my web application. i also understand that <Context> - should not be used for TomCat5.0 - but need to put inside /META-INF/context.xml. 1)My problem is my working directory is different. I use ant to create war file and then i manually stop the server - delete existing war file / existing directory (This is due to some Win TomCat problem .??..). Then i deploy it using TomCat Manager. It automatically creates META-INF file for me, i do not have META-INF inside my working directory. So where i can put my context.xml ? 2) What shall i put inside context.xml and what shall i put inside server.xml / web/xml ? I tried many different ways but when i use context and as there is no such application (because i delete and re-deploy it) - tomcat server does not run my application. Pls guide me regards Manisha
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com