Members Equity Email System Just a quick addition on custom JDBC realms...We had to implement our own to use an existing DB schema etc. The 'trick' to get it working was we had to hack our own mbeans-descriptors.xml file. You'll find this in one of the Catalina.jars. We basically extracted it, added our own JDBCRealm config, then put this file in the server/classes/org/apache/catalina/mbeans directory. This of course overrides the one in the jar file.
Hope this helps... -----Original Message----- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Sunday, 23 March 2003 3:40PM To: Tomcat Users List Subject: Re: custom JDBCRealm You don't need to implement a custom realm for this. You can use a servlet filter. The userid of the currently logged in user can be accessed via request.getUserPrincipal().getName(). You can use this information to lookup the other user data in the database and place it in the session (if it doesn't already exist). ----- Original Message ----- From: "Bill Barker" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 22, 2003 11:45 PM Subject: Re: custom JDBCRealm > In theory, common/{classes, lib} should work, but I've never tried it. > shared/{classes, lib} won't work, and WEB-INF/{classes, lib} should fail as > well. > > Actually, re-reading closer, you have to put your class in server/{classes, > lib}. Otherwise the classloader won't be able to find the > "FormAuthenticator" base class. My custom Authenticator (installed in > server/lib) is working like a charm :-). > > "Carl Maib" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > bill, > i have tried placing my source in common/classes, common/lib, shared/lib and > shared/classes with no luck. depending on where i put my class, it was > either in a Jar as part of a package, or just a stand-alone class. > > i am really baffled here, it seems like one of those solutions should have > worked. yet, i continue to get the NoClassDefFound error for the catalina > class i am overriding (FormAuthenticator). > > i know i am a newbie to tomcat, so perhaps i am missing something simple. if > anyone has had any luck overriding any of the catalina classes in their > webapp and has had some success actually running it, please lend a hand! > > thanks! > > "Bill Barker" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > "Carl Maib" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > i am attempting the exact same thing, but have been advised it would be > > > better to override the FormAuthenticator. this gives you direct access > to > > > the session. > > > > > > the solution seems perfect, however, i i can't seem to get past > > > classNotFound exceptions. i am not familiar with how to link catalina > > > classes and the Class Loader docs are not giving me the answer. > > > > > > i have configured server.xml to contain my custom valve, the class which > > > overrides FormAuthenticator. i have placed this class in common/classes. > i > > > get class not found exceptions on FormAuthenticator bcz my webapp is not > > > able to reference the necessary objects in catalina.jar. > > > > It needs to be in server/classes, so that it can see the Catalina classes. > > > > > > > > please let me know if you get this solution to work. thanks! > > > > > > ----- Original Message ----- > > > From: "awc" <[EMAIL PROTECTED]> > > > To: "'Tomcat Users List'" <[EMAIL PROTECTED]> > > > Sent: Friday, March 21, 2003 4:41 PM > > > Subject: Custom JDBCRealm > > > > > > > > > > Hi, > > > > > > > > I want to add more stuff to user session while user logs in. The only > > > > way I see to do this is to write custom JDBCRealm class which extnds > > > > org.apache.catalina.realm.JDBCRealm or implement > > > > org.apache.catalina.realm.RealmBase class. > > > > > > > > This custom class will have more initializing parameters too. Any > > > > thoughts on this from one who already did sort of thing?? > > > > > > > > I am going to use this one with securityFilere from > > > > www.securityfilter.org. > > > > > > > > Thank you in advance for any replies. > > > > > > > > .anil > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MEMBERS EQUITY PTY LTD ABN 56 070 887 679 This email and any attachments are confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this e-mail or any attachments. If you have received this email in error, please tell us immediately by return email and delete this e-mail and any attachments. This message should not be removed.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
