tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: URL is "null" and HTTP 404 error when using FROM authentication
Date Fri, 13 Jun 2008 05:32:58 GMT
> From: exkor []
> Subject: URL is "null" and HTTP 404 error when using FROM
> authentication

You have some weirdness in your web.xml and context.xml that should be straightened out before
attempting any further analysis.

>    <servlet>
>        <servlet-name></servlet-name>
>        <display-name></display-name>
>        <servlet-class></servlet-class>
>        <load-on-startup>0</load-on-startup>
>    </servlet>

I have no idea what should be done with an empty <servlet> declaration, and it's possible
Tomcat doesn't either; get rid of it.

>        <auth-constraint>
>            <role-name>admin</role-name>
>            <role-name>manager</role-name>
>        </auth-constraint>
>    <security-role>
>        <role-name>admin</role-name>
>    </security-role>

Either you have an extra role listed in <auth-constraint>, or you're missing one under
<security-role>; get them in synch.

> My context.xml:

Where is your context.xml file?  It should be in your webapp's META-INF directory.  If you've
changed the global one in Tomcat's conf directory, put it back the way it was and put your
<Context> element in the proper location.

> <Context path="/hamula" reloadable="true" crossContext="true"
> debug="99">

The path attribute is not allowed in a <Context> element in context.xml; remove it.

>    <Logger className="org.apache.catalina.logger.FileLogger"
>             prefix="localhost_hamula_log." suffix=".txt"
>             timestamp="true"/>

There is no <Logger> element in Tomcat 6; remove it.

>    <Resource name="jdbc/hamula"
>              auth="Container"
>              type="javax.sql.DataSource"
>              driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/hamula?autoReconnect=true"/>
>              username="root"
>              password="skywalker"
>          digest="MD5"
>              logAbandoned="true"
>              removeAbandoned="true"
>              removeAbandonedTimeout="10"
>              maxActive="20"
>              maxIdle="10"
>              maxWait="-1"/>

The above is obviously broken, since you have terminated the <Resource> element twice.
 Regardless, it seems odd for the <Realm> and the application <Resource> to be
using the exact same data base; is that what you really want?

>    <Realm className="org.apache.catalina.realm.JDBCRealm"

Change the <Realm> back to the MemoryRealm for testing with FORM login; once you get
that working, then move on to the JDBCRealm.  One step at a time.

You say you have httpd 2.0 in the mix; don't use it for testing, go straight to Tomcat's http
port.  Only after that works should you introduce any further complications.

All of the above may not to fix your problem, but it will remove some confusion from your

 - Chuck

for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message