tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armin Pfarr" <apf...@vipsurf.de>
Subject Sample for Form based authentication
Date Sun, 16 Jan 2000 17:31:19 GMT
I haven't been able to setup a secure site yet. My web.xml-file looks like

<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>
  <security-constraint>
	 <web-resource-collection>
		<web-resource-name>Test</web-resource-name>
		<url-pattern>/*</url-pattern>
		<http-method>GET</http-method>
		<http-method>POST</http-method>
	 </web-resource-collection>
	 <auth-constraint>
		<role-name>manager</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>default</realm-name>
	 <form-login-config>
		<form-login-page>/Login.jsp</form-login-page>
		<form-error-page>/Error.htm</form-error-page>
	 </form-login-config>
  </login-config>
  <security-role>
	 <role-name>manager</role-name>
  </security-role>
</web-app>

This doesn't result in the display of /Login.jsp when accessing the webapp
with
http://localhost:8080/test/Welcome.htm as I would have suspected. Instead
the Welcome.htm page
is displayed as it is without these configurations.

Any idea?

Armin Pfarr


Mime
View raw message