• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Form base authentication in tomcat

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nO bOdY kNows.....???
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic