You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sim IJskes <si...@nyx.xs4all.nl> on 2000/04/01 17:07:42 UTC

Silly question.

I got my tomcat 3.1b1 running on both W95 and Linux2.2.1. standalone.

Now i would like to use security:

but it will not let me in. Is the 'basic' security not working yet?


Thanks,

Sim



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
tomcat-users.xml:

<tomcat-users>
  <user name="tomcat" password="tomcat" roles="tomcat" />
  <user name="sim" password="pass" roles="kiwiadmin" />
</tomcat-users>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
web.xml:

<?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>a Kiwi web</display-name>
<!--
	<login-config>
		<auth-method>FORM</auth-method>
		<realm-name>examples</realm-name>
		<form-login-config>
			<form-login-page>/jsp/security/login.jsp</form-login-page>
		</form-login-config>
	</login-config>
-->
	<security-constraint>
		<web-resource-collection>
			<web-resource-name>a</web-resource-name>
			<url-pattern>*.jsp</url-pattern>
<!--
			<url-pattern>/jsp/security/protected1/</url-pattern>
			<http-method>GET</http-method> 
			<http-method>POST</http-method> 
-->
			<auth-constraint>
				<role-name>kiwiadmin</role-name>
				<role-name>kiwiuser</role-name>
				<role-name>kiwiguest</role-name>
			</auth-constraint>
		</web-resource-collection>
	</security-constraint>
	
	<session-config>
		<session-timeout>30</session-timeout>    <!-- 30 minutes -->
	</session-config>

</web-app>