I recently installed tomcat 4.1.29 and deployed a web application on
it via a war-file. The provided server.xml contains the following
lines:
Have I forgotten to do some additional initialization or configuration or something else? Any ideas?
I think you have. When you have a global resource, it doesn't actually mean that it's available for all contexts. It just means that it's available /to be available/ for all contexts :)
In order to actually give it to a context, you need a resource link in server.xml:
<ResourceLink name="jdbc/myDataSource"
global="jdbc/myDataSourceRef"
type="javax.sql.DataSource" />Note that this also gives you the opportunity to rename resources. That's nice, just in case your OPS team decides that your data source (you're not using one, but I am) should be called "jdbc/untrusted/204353245" but my application likes the nicer name of "jdbc/theDataSource".
I also have the following in my web.xml file, which may or may not be necessary.
<resource-ref>
<description>DataSource for my application</description>
<res-ref-name>jdbc/myDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>Good luck, -chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
