tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Crowther" <>
Subject RE: Realm implemenation, passing additionnal informations to webapplication
Date Mon, 06 Jun 2005 09:43:34 GMT
> From: delbd [] 
> I thought to create a decorator class around  
> a Principal to 
> store this information and do a typecasting in webapp to 
> access additionnal informations. 

Or implement your own Principal - either would work I think.

> But the realm implementation is stored in 
> server/lib/myrealm.jar and am not 
> sure classes in server/lib/*.jar are visible to the webapplication.
> Any recommendation?

We've dealt with this in another project by splitting the implementation
into two jars: myrealm-impl.jar and myrealm-api.jar.  The API jar
contains the classes required by server and webapp (which should just be
the interface definitions if it's factored correctly), and goes into
common/lib.  The other jar contains the implementation and goes in
server/lib.  It worked for us; watch out for classloader issues if you
mention any class in the API that is in the implementation jar, as the
webapp won't be able to load those classes.

		- Peter
Peter Crowther, Director, Melandra Limited
John Dalton House, 121 Deansgate, Manchester M3 2AB
t: +44 (0)161 828 8736  f: +44 (0)161 832 5683

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message