Context specific JNDI parameters problem in tomcat 6

前端 未结 3 1774
无人及你
无人及你 2021-02-14 18:56

I am having trouble using JNDI when two or more applications are deployed on Tomcat 6. Consider the following scenario: I have 2 webapps, where each web.xml contains one JNDI pa

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-14 19:56

    From the example you give, I take it that "value A" should only be defined for (and accessible from) webapp A, and vice versa.

    One way to achieve is is to define them as context parameters (not JNDI resources) in each webapp's META-INF/context.xml file, as described here. If you do this, you can be sure each parameter is only reachable from its own webapp.

提交回复
热议问题