Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form base authentication in tomcat

 
Vijay Kumar
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi....... alll

Can I create Two Realm for Form base authentication like this

First One:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc racle:thin:@80.0.0.69:1526 RACLE"
connectionName="scott" connectionPassword="tiger"
userTable="user_master_vu" userNameCol="user_code" userCredCol="PASSWORD_HASH"
userRoleTable="user_roles" roleNameCol="role_name" />
============================================================================
Second One:
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc racle:thin:@80.0.0.69:1526 RACLE"
connectionName="scott" connectionPassword="tiger"
userTable="user_master" userNameCol="user_code" userCredCol="password"
userRoleTable="user_roles" roleNameCol="role_name" />

for Ist on I m using
userTable="user_master_vu" userNameCol="user_code" userCredCol="PASSWORD_HASH"
& for IInd is this
userTable="user_master" userNameCol="user_code" userCredCol="password"

I deploy aroung 20 application at my tomcat4 for some application I want to use first one Realm & for the rest application I want to use second Relam

although I have written both of the Relam in server.xml and server starts perfectly but it considerd only first one.....
so please tell me how can I resolve this problem...
 
Vijay Kumar
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nO bOdY kNows.....???
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which scope did you put your realm in? If its are in the engine it applies to all apps, in the host they will apply to all apps within that virtual host. In a context it will apply to a specific app. So to configure one for some apps and another for different apps, you can define seperate virtual hosts or put the realm in each context it applies to.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic