Hi folks,

I'm trying to configure a custom error page for the HTTP error 401 (authentication failed). See appenix for my web.xml. Without the error-page-Tag everything works fine. This means that an authentication window pops up. The HTTP response containt the following line:

WWW-Authenticate: Basic realm="hostname:port"

If I press cancel or fail to provide the correct credentials, there will be a redirect to the 401 error-page.

With the error-page-Tag included in the web.xml, the given page error/error.html is presented to the client without pop up. No WWW-Authenticate attribute is included in the HTTP response.

I appreciate any help. :-)

Philipp

web.xml:
<web-app>
   <display-name>xxx</display-name>
   <context-param>
       <param-name>tapestry.app-package</param-name>
       <param-value>xxx</param-value>
   </context-param>
   <filter>
       <filter-name>app</filter-name>
       <filter-class>org.apache.tapestry5.TapestryFilter</filter-class>
   </filter>
   <filter-mapping>
       <filter-name>app</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
<error-page>
       <error-code>401</error-code>
       <location>/error/error.html</location>
   </error-page>
<security-constraint>
        <web-resource-collection>
       <web-resource-name>All resources</web-resource-name>
       <description>Protects all resources</description>
       <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
       <role-name>user</role-name>
    </auth-constraint>
   </security-constraint>
   <login-config>
       <auth-method>BASIC</auth-method>
   </login-config>
   <security-role>
       <role-name>user</role-name>
   </security-role>
</web-app>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to