We have an application running on Tomcat6 uses the below resource defined in
server.xml.

<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase" description="User database that can
be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />

We have added a new resource as below in server.xml and commented the
existing resource tag.

<Resource name="jdbc/SsoDs" auth="Container" type="javax.sql.DataSource"
description="SSO DataSource" username="josso182"
password="josso182" driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@md1npddev10:1521:jdaj"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" maxActive="8"
maxIdle="4"/>

The Josso application using the above data source is working fine. But we
have a security constraint defined in web.xml for some pages with in our
application as below. 

   <security-constraint> 
      <web-resource-collection> 
         <web-resource-name>Technical Website</web-resource-name> 
         <url-pattern>/technical/*</url-pattern> 
      </web-resource-collection> 
      <auth-constraint> 
         <role-name>manager</role-name> 
      </auth-constraint> 
   </security-constraint> 
   <login-config> 
      <auth-method>DIGEST</auth-method> 
      <realm-name>@APPNAME@ WebUI</realm-name> 
   </login-config>

To make this work, i added the existing resource tag in the applications
context file in 
conf/Catalina/localhost as below:

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="/usr2/tomcat/hmtosys760u/webapps/mto">
<Resource auth="Container" description="User database that can be updated
and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/>
</Context>

It is not working. When try to access the application with the pages having
url-pattern '/technical/*', getting the error "HTTP Status 403 - Access to
the requested resource has been denied".

Please let me know if there is any way to resolve this issue.



-- 
View this message in context: 
http://old.nabble.com/Multiple-UserDatabases-tp26977405p26977405.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to