[jboss-user] [Installation, Configuration & DEPLOYMENT] - error 401
edgoquist
do-not-reply at jboss.com
Thu Aug 14 14:26:00 EDT 2008
I'm using jboss-4.2.2GA and I'm using it the easiest way I can. I've simply created a directory named ROOT.war under the deploy directory and added a WEB-INF/web.xml file and voila. I also have some restricted pages that are protected by a login-config.
When I include an error-page element in the web.xml file:
<error-page>
<error-code>401</error-code>
/errorpages/mypage401.html
</error-page>
I get an HTTP 401 error every time I try to access a protected page (the auth-method is BASIC). To fix the problem, all I have to do is remove the <error-page> definition.
Here's the entire web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>eriktest</web-resource-name>
eriktest
<url-pattern>/protected/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Employee</role-name>
</auth-constraint>
<transport-guarantee>NONE</transport-guarantee>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<error-page>
<error-code>401</error-code>
/errorpages/mypage401.html
</error-page>
</web-app>
I've searched and found that a number of people have complained about the same thing but I haven't been able to find a solution. Does one exist?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170635#4170635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170635
More information about the jboss-user
mailing list