Summary: | Cannot use JNDI datasources in ROOT context | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Miles Barr <miles> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | stumm |
Priority: | P2 | ||
Version: | 5.5.7 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
Bug Depends on: | 30117 | ||
Bug Blocks: |
Description
Miles Barr
2005-02-02 16:41:17 UTC
A discussion of the topic from TSS: http://theserverside.com/discussions/thread.tss?thread_id=25459#137873 The cause of the problem might be described in bug #30117 that notices that resource parameters are ignored under the root context. The right path to be used in server.xml is "", not "/". What you did would just create another webapp which would never be accessed, while your webapp would be deployed by the auto deployer, without your parameters. We used to have an example in server.xml for this special case (<Context path="" docBase="ROOT" debug="0"/>), but it's removed as we recommend not using server.xml for declaring contexts. Try to avoid using Context elements in server.xml except for webapps which are outside of the Host appBase. Instead, as you mention, use $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml or whatever_your_war_is.war/META-INF/context.xml, but don't use either docBase or path (which would be ignored anyway) on your Context element. Note: The AJP connector is not needed, if you don't use it. (makes sense, I suppose) Thanks for the heads up. |