1

I have read a couple of resources to get the answer for this question. But I am not getting convincing answer.

Question is : 1)What is the use of resource-ref in web.xml ? I am trying to link this specifically in tomcat container.

As per enter link description here

It will be one kind of indirection. Use application specific name in "web.xml" and container specific JNDI name exists in container specific file.

However in case of tomcat , how are we mapping resource name in web.xml to resource defined in context.xml ? The reference documentation for tomcat also is not helping why to define resource-ref ? Same name in resource-ref as in context.xml. We are not achieving anything here

Tomcat reference documentation is also not helping much

In fact I have created sample Spring application in which I defined datasource in context.xml and referenced in Spring context file. I have not defined anything in web.xml.

Andremoniy
  • 34,031
  • 20
  • 135
  • 241
Atul
  • 1,560
  • 5
  • 30
  • 75

0 Answers0