tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Error 404: file not found while using BASIC HTTP Authorization
Date Fri, 19 Jan 2007 18:45:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shilpa,

Shilpa Arora wrote:
>  <security-constraint>
>    <web-resource-collection>
>      <web-resource-name>register-ucr</web-resource-name>
>      <url-pattern>/pages/about.html</url-pattern>
>    </web-resource-collection>
>    <auth-constraint>
>      <role-name>manager</role-name>
>    </auth-constraint>
>  </security-constraint>
> 
>  <login-config>
>    <auth-method>BASIC</auth-method>
>    <realm-name>register-ucr</realm-name>
>  </login-config>

This configuration looks okay.

> When we try to access the page we give in <url-pattern>, we get an error
> in IE, error 404: file not found.

Where is your file? Is it possible that your file is in the wrong place?
Is the 404 error being returned by Tomcat or are you using Apache httpd
to serve static pages?

> And when we simply give
> *<url-pattern>/*</url-pattern>* , strange thing is it doesn't prompt for
> the user name and just shows us the page directly with no error as if
> there was no change.

Once you login once with BASIC authentication, you are basically logged
in until you close your browser. Have you tried that? Or, use a
different browser or another separate instance of MSIE in order to test?
I know that I've made similar mistakes when testing this kind of
thing... the browser and server agree that you /are/ logged-in, but you
don't think you should be.

> We also made change in server.xml of tomcat. Where we commented the
> UserDatabaseRealm reference and uncommented the MemoryRealm reference.

The choice of realm should not matter (assuming that the allowed users
are the same). Once you are logged-in using BASIC auth, changing the
realm won't affect anything (since you are already logged-in).

> In our application, we are using Struts as well.

Struts should not be interfering, here. As you pointed out, you are
trying to serve a static file (about.html), so Struts should not be
involved.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFsRHB9CaO5/Lv0PARAji5AJ92i0i316q2U7uvMl/qglN6UiCRUQCfXeT5
o4MkaZfjF6ZTJIt4/Gx1lTM=
=Z9ZD
-----END PGP SIGNATURE-----

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


Mime
View raw message