You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by LERBSCHER Jean-Pierre <je...@cofiroute.fr> on 2005/02/15 18:09:06 UTC

RE : RE : RE : RE : Tomcat configuration

There is no realm describe into it!
Have you declared your realm in your META-INF/context.xml directory of your
WAR file?
Could you send us your context.xml file?

-----Message d'origine-----
De : Curtis Nelson [mailto:Nelson@larsondavis.com] 
Envoyé : mardi 15 février 2005 18:03
À : tomcat-user@jakarta.apache.org
Objet : Re: RE : RE : RE : Tomcat configuration

With pleasure.  

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />

  </GlobalNamingResources>


  <Service name="Catalina">
    <Connector port="8080" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
    <Connector port="8009" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
         
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">

      <Host name="localhost" appBase="webapps" unpackWARs="true" 
						autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
     </Host>

    </Engine>

  </Service>

</Server>



Thanks for you help.


>>> jean-pierre.lerbscher@cofiroute.fr 02/15/05 09:51AM >>>
JAASRealm is not a default!
Could you send us your server.xml?

-----Message d'origine-----
De : Curtis Nelson [mailto:Nelson@larsondavis.com] 
Envoyé : mardi 15 février 2005 17:43
À : tomcat-user@jakarta.apache.org 
Objet : Re: RE : RE : Tomcat configuration

How can I configure Tomcat to not use JAASRealm?  Like I said earlier, if my
JDBCRealm is associated with the <engine> or <host> element of server.xml,
the login forms work.  It's only when I move it into it's own .xml file or
add it as part of the <context> element that I run into problems.  Does
doing that automatically require JAASRealm?  

Thanks

>>> jean-pierre.lerbscher@cofiroute.fr 02/15/05 09:39AM >>>
If I look at this log, it seems that you are using JAAS Realm !
Feb 14, 2005 4:20:39 PM org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login configuration

-----Message d'origine-----
De : Curtis Nelson [mailto:Nelson@larsondavis.com] 
Envoyé : mardi 15 février 2005 17:15
À : tomcat-user@jakarta.apache.org 
Objet : Re: RE : Tomcat configuration

Thanks for the reply.

I'm not using (to the best of my knowledge) JAASRealm.  I just want to use
JdbcRealm, but define it at the <context> level.

Curtis


>>> jean-pierre.lerbscher@cofiroute.fr 02/15/05 09:08AM >>>
Hi,
Do you use JdbcRealm or JaasRealm ?
If you use JAASRealm you have to setup your jaas config file (for example
using java.security.auth.login.config system property. This file specifies
application by application your login module.
In your case, it seems that you have to declare Realm in your application
context.

-----Message d'origine-----
De : Curtis Nelson [mailto:Nelson@larsondavis.com] 
Envoyé : mardi 15 février 2005 16:41
À : tomcat-user@jakarta.apache.org 
Objet : Tomcat configuration

If I want to host several different web apps in Tomcat, each having it's own
user database & using FORM authentication, how would I configure Tomcat?  I
tried putting the jdbcRealm in the /engine/hostname/nnn.xml file, yet when I
try to log into one of my pages I get the error:

Feb 14, 2005 4:20:39 PM org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login configuration

Can anyone please help me with this?  I've spent about a week on it already.


Please note:  If I put the JdbcRealm in the <engine> or <host> element of
server.xml, everything works fine - except then I can't have a 1-to-1
mapping between webapp and login database.

Thanks,

Curtis



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org