-
1. Re: Getting the authenticated user name
swatkat Dec 21, 2001 12:05 AM (in response to rgsuresh)Can you be more specific as what your web.xml looks like ? and i think what you are asking for is BASIC kind of authentication.
-
2. Re: Getting the authenticated user name
rgsuresh Dec 21, 2001 4:41 AM (in response to rgsuresh)<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<servlet-name>Servlet1</servlet-name>
<servlet-class>Servlet</servlet-class>
<security-role-ref>
<role-name>authorizedUser</role-name>
<role-link>authorizedUser</role-link>
</security-role-ref>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>name</web-resource-name>
<url-pattern>/protectes/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>authorizedUser</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>other</realm-name>
- <form-login-config>
<form-login-page>/login/login.jsp</form-login-page>
<form-error-page>/login/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>authorizedUser</role-name>
</security-role>
</web-app>