You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Koes, Derrick" <De...@Smith-Nephew.com> on 2002/07/08 19:33:40 UTC

authentication problem

Configuration:

Tomcat 4.0.4

Apache 2.0.39

 

I'm successfully authenticating to my index.jsp, however when I attempt to
access the other servlet (MediaContentHandler) identified in my web.xml
deployment descriptor I am prompted to login again.  Since this servlet is
not in my security constraint, why is it prompting me to login?  BTW, the
username and password used to authenticate to index.jsp don't work in the
"re-authentication".

My web.xml is listed below.

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

  <display-name>Test</display-name>

  <description>Test</description>

  <servlet>

    <servlet-name>Dora</servlet-name>

    <display-name>Dora</display-name>

    <jsp-file>index.jsp</jsp-file>

    <init-param>

      <param-name>dora.propertyFile</param-name>

      <param-value>dora.properties</param-value>

    </init-param>

    <init-param>

      <param-name>dora.version</param-name>

      <param-value>1.0</param-value>

    </init-param>

  </servlet>

  <servlet>

    <servlet-name>MediaContentHandler</servlet-name>

    <display-name>Media Content Handler</display-name>

    <description>Handler for retrieving and storing media files into
DORA</description>

    <servlet-class>com.snn.multimedia.ui.MediaContentHandler</servlet-class>

  </servlet>

  <servlet-mapping>

    <servlet-name>Dora</servlet-name>

    <url-pattern>/index.jsp</url-pattern>

  </servlet-mapping>

  <servlet-mapping>

    <servlet-name>MediaContentHandler</servlet-name>

    <url-pattern>/MediaContentHandler</url-pattern>

  </servlet-mapping>

  <welcome-file-list>

    <welcome-file>index.jsp</welcome-file>

  </welcome-file-list>

  <security-constraint>

    <web-resource-collection>

      <web-resource-name>index</web-resource-name>

      <url-pattern>/index.jsp</url-pattern>

    </web-resource-collection>

    <auth-constraint>

      <role-name>manager</role-name>

      <role-name>tomcat</role-name>

    </auth-constraint>

  </security-constraint>

  <login-config>

    <auth-method>BASIC</auth-method>

    <realm-name>localhost</realm-name>

  </login-config>

</web-app>

 

Thanks for the help.

 

Derrick