basic FORM-based authentication failing

2004-09-10 Thread Fred Blaise
Hello all

I have been trying to set up FORM based authentication, but it only works
half-way.
When I try to get to the protected resource, it sends me to the login page:
good.
If I authenticate incorrectly, then it sends me to the login error page: good.
If I authenticate _correctly_, it also sends me to the login error page: bad.

I have been reading at jakarta.apache.org, and in JSP  Servlets cookbook, and I
don't know what I am doing wrong. Please find the config files below. My form
uses the j_user_name, j_password and so forth. I have reloaded the app and
restarted tomcat.

Thank you for any help/pointers...

fb.

--tomcat-users.xml (truncated...)
 user username=joedoe password=1joe2 roles=clients/
--end tomcat-users.xml

--web.xml
?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

!-- Beginning of web.xml deployment descriptor --

security-constraint
web-resource-collection
web-resource-nameClient login/web-resource-name
url-pattern/clients/index.jsp/url-pattern
http-methodGET/http-method
http-methodPOST/http-method
/web-resource-collection

auth-constraint
role-nameclients/role-name
/auth-constraint

user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint

/security-constraint
login-config

auth-methodFORM/auth-method

form-login-config

form-login-page/login.jsp/form-login-page
form-error-page/loginError.jsp/form-error-page

/form-login-config

/login-config

security-role
role-nameclients/role-name
/security-role

/web-app
--end web.xml

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [SOLVED] basic FORM-based authentication failing

2004-09-10 Thread Fred Blaise
Awful typo... works much better when j_user_name is spelled j_username

Issue resolved.

Thanks.

fb.

Quoting Fred Blaise [EMAIL PROTECTED]:

 Hello all

 I have been trying to set up FORM based authentication, but it only works
 half-way.
 When I try to get to the protected resource, it sends me to the login page:
 good.
 If I authenticate incorrectly, then it sends me to the login error page:
 good.
 If I authenticate _correctly_, it also sends me to the login error page: bad.

 I have been reading at jakarta.apache.org, and in JSP  Servlets cookbook,
 and I
 don't know what I am doing wrong. Please find the config files below. My form
 uses the j_user_name, j_password and so forth. I have reloaded the app and
 restarted tomcat.

 Thank you for any help/pointers...

 fb.

 --tomcat-users.xml (truncated...)
  user username=joedoe password=1joe2 roles=clients/
 --end tomcat-users.xml

 --web.xml
 ?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

 !-- Beginning of web.xml deployment descriptor --

 security-constraint
 web-resource-collection
 web-resource-nameClient login/web-resource-name
 url-pattern/clients/index.jsp/url-pattern
 http-methodGET/http-method
 http-methodPOST/http-method
 /web-resource-collection

 auth-constraint
 role-nameclients/role-name
 /auth-constraint

 user-data-constraint
 transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint

 /security-constraint
 login-config

 auth-methodFORM/auth-method

 form-login-config

 form-login-page/login.jsp/form-login-page
 form-error-page/loginError.jsp/form-error-page

 /form-login-config

 /login-config

 security-role
 role-nameclients/role-name
 /security-role

 /web-app
 --end web.xml

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]