• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Realm Possible?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using MySQL 5.0 and Tomcat 5.5.20.

Currently I have:
1. Security Constraint on a folder (WebApps -> Protected).
2. Realm under server.xml so I can authenticate users listed in MySQL database.

Everything stated above still works fine, however, now I have another MySQL database (To Avoid Confustion lets call it PersonalDB) for which I have to write an application. For obvious reasons, I have to protect the application, so I decided to use security constraint to authenticate users.

Here is the problem:
1. The username and password are listed in the PersonalDB
2. I am already using a Realm for my first application
3. I am not sure if it's possible to add another Realm

I don't know how I can properly authenticate the users for my second application. Any help or information will be greatly appreciated.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not think configuration of multiple releams is possible , but you can always have a custom releam that would check the second database for authentication information if it doesnot find the required information in the first one.
 
M. Siddiqui
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Rahul.

How can I cutomize realm?
Is there a link to a tutorial or an example I can refer to.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by M. Siddiqui:
Thanks for the reply Rahul.

How can I cutomize realm?
Is there a link to a tutorial or an example I can refer to.



You have to write your own relean , not customer.
Look in the tomcat homepage or google about custom releams for Tomcat.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to our Tomcat forum
 
reply
    Bookmark Topic Watch Topic
  • New Topic