File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Using global datasource in web-app DataSourceRealm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Using global datasource in web-app DataSourceRealm" Watch "Using global datasource in web-app DataSourceRealm" New topic
Author

Using global datasource in web-app DataSourceRealm

David Sheltby
Ranch Hand

Joined: Oct 19, 2011
Posts: 34
I have a DataSource for a connection pool defined at the tomcat level (tomcat/conf/context.xml). In the context.xml configuration of one of my web-apps I have an authentication DataSourceRealm defined and I'd like it to use the global datasource to do the authentication, but that datasource is not bound in the web-app context and so it throws an error. I know I can move the realm configuration from the webapp to the conf/server.xml config, but I dont want it used for all my webapps; just one in particular. The way I see I have two options: create a separate virtual host (service) in conf/server.xml just for this one web-app; or just use a JDBCRealm instead. Are there other options?

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using global datasource in web-app DataSourceRealm
 
Similar Threads
Tomcat authenticationn failing with correct credentials
Global Resources
DatasourceRealm just ain't working
About server.xml in Tomcat
Webapp specific context/datasource