You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by olivier nouguier <ol...@gmail.com> on 2007/03/07 19:48:08 UTC

Re: [Tomcat 5.5.20] How to use JAASRealm ?

hi,
 I can't figure out why you need to extend a JaasRealm ?
This class "lives" in the server classloader, therein it cannot be and
should definitivly never be accessed from your webapp.
I think that you missunderstand the way to use the JaasRealm. Please look at
my previous post (today) and tell me if it's clear enougth.

HIH



On 2/13/07, Stefan Lecho <st...@gmail.com> wrote:
>
> Hello,
>
> In our project we are using a class that extends JAASRealm. This class is
> deployed in Tomcat 5.5.20.
>
> When accessing this class, an exception is generated:
> java.lang.NoClassDefFoundError: org/apache/catalina/realm/JAASRealm. By
> copying catalina-optional.jar from server\lib to common\lib, the original
> exception is no longer generated, but other exceptions are generated.
> In order to remove all generated exceptions, I am obliged to copy the
> following jars from server\lib to common\lib: catalina.jar,
> catalina-cluster.jar, catalina-optional.jar, catalina-storeconfig.jar,
> commons-modeler.jar, tomcat-ajp.jar, tomcat-coyote.jar, tomcat-http.jarand
> tomcat-util.jar.
>
> Is there another - cleaner - solution to make JAASRealm-derived classes
> work
> in Tomcat 5.5.20 ?
>
> Regards, Stefan Lecho.
>



-- 
"Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
et toi dans les pleurs.
Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
et toi dans la joie."

Re: [Tomcat 5.5.20] How to use JAASRealm ?

Posted by olivier nouguier <ol...@gmail.com>.
Sorry for the double post:

If you really need to use Jaas:
1: Write your own LoginModule (implementing
java.security.auth.spi.LoginModule)
2: Write a  jaas.conf description file (must be declared with -
Djava.security.auth.config .... )
3: The appName (TMSLogin) must reference a valid config in the jaas.conf
4: Configure the context / web.xml file


On 3/7/07, olivier nouguier <ol...@gmail.com> wrote:
>
> hi,
>  I can't figure out why you need to extend a JaasRealm ?
> This class "lives" in the server classloader, therein it cannot be and
> should definitivly never be accessed from your webapp.
> I think that you missunderstand the way to use the JaasRealm. Please look
> at my previous post (today) and tell me if it's clear enougth.
>
> HIH
>
>
>
> On 2/13/07, Stefan Lecho <st...@gmail.com> wrote:
> >
> > Hello,
> >
> > In our project we are using a class that extends JAASRealm. This class
> > is
> > deployed in Tomcat 5.5.20.
> >
> > When accessing this class, an exception is generated:
> > java.lang.NoClassDefFoundError: org/apache/catalina/realm/JAASRealm. By
> > copying catalina-optional.jar from server\lib to common\lib, the
> > original
> > exception is no longer generated, but other exceptions are generated.
> > In order to remove all generated exceptions, I am obliged to copy the
> > following jars from server\lib to common\lib: catalina.jar,
> > catalina-cluster.jar, catalina-optional.jar, catalina-storeconfig.jar,
> > commons-modeler.jar, tomcat-ajp.jar, tomcat-coyote.jar, tomcat-http.jarand
> > tomcat-util.jar .
> >
> > Is there another - cleaner - solution to make JAASRealm-derived classes
> > work
> > in Tomcat 5.5.20 ?
> >
> > Regards, Stefan Lecho.
> >
>
>
>
> --
> "Souviens-toi qu'au moment de ta naissance tout le monde était dans la
> joie et toi dans les pleurs.
> Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
> et toi dans la joie."




-- 
"Souviens-toi qu'au moment de ta naissance tout le monde était dans la joie
et toi dans les pleurs.
Vis de manière qu'au moment de ta mort, tout le monde soit dans les pleurs
et toi dans la joie."