Hi Gregor,

Shouldn't you add a clueuser to your tomcat-users.xml?

Mylene

On 12/22/06, Gregor Schneider <[EMAIL PROTECTED]> wrote:
god, what a bloody crap, i'm about to dump this whole tomcat into the
bin and jump out of the window....

now i've tried to set up a memory-realm, and i'm getting the following
error for a change:

 DEBUG http-8080-Processor4 org.apache.catalina.authenticator.FormAuthenticator
- Authenticating username 'tomcat'
 DEBUG http-8080-Processor4 org.apache.catalina.authenticator.FormAuthenticator
- Authenticating username 'tomcat'
 ERROR http-8080-Processor4 org.apache.catalina.realm.JAASRealm - Unexpected err
or
 java.lang.SecurityException: Unable to locate a login configuration
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct

The server.xml looks as follows:

    <Engine name="Catalina" defaultHost="localhost">
        <!--Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase" /-->

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
        <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" />

My $CATALINA_HOME/conf/tomcat-users.xml looks like this:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="tomcat"/>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="tomcat" password="tomcat"
roles="tomcat,admin,manager,clueuser"/>
</tomcat-users>

The WEB-INF of my application as follows:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
    <security-constraint>
        <web-resource-collection>
        <web-resource-name>Protected Area</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>clueuser</role-name>
        </auth-constraint>
    </security-constraint>
    <!-- test -->
    <login-config>
            <auth-method>FORM</auth-method>
            <realm-name>Clue4Bereich</realm-name>
            <form-login-config>

<form-login-page>/login_clue/loginForm.html</form-login-page>
                    <form-error-page>/login_clue/error.html</form-error-page>
            </form-login-config>
    </login-config>
    <!-- end test -->
    <security-role>
        <description>CLUE-Users</description>
        <role-name>clueuser</role-name>
    </security-role>

The login-form shows up, and then I'm forwarded to my error-page

Is there something wrong with the JDK-installation?

Any suggestions where I might take a look at?

Clueless

Greg

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Mylene

Books just wanna be FREE! See what I mean at:
http://bookcrossing.com/friend/mylene

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to