hello all,

I am trying to do FORM base authentication with tomcat 4.0.1. 

Path to my application is C:tomcat4.0.1/webapps/Myapplication

I configured   C:tomcat4.0.1/webapps/Myapplication/web-inf/web.xml file as mentioned in documentation

1. I followed this procedure

add username and password in tomcat-usr.xml file

2.edit web.xml as follow

<security-constraint>
       <web-resource-collection>
          <web-resource-name>Record</web-resource-name>
          <url-pattern>/home/*</url-pattern>
       </web-resource-collection>
    </security-constraint>

<login-config>
      <auth-method>FORM</auth-method>
      <realm-name>Example Form-Based Authentication Area</realm-name>
      <form-login-config>
        <form-login-page>/login.jsp</form-login-page>
        <form-error-page>/login-error.html</form-error-page>
      </form-login-config>
    </login-config>

My first page of application is http://localhost/Myapplication/main.jsp  which has link home.

my home directory is under c:\tomcat4.0.1\Myapplication\home and there is home.html file

I want to restrict access as I mentioned in my web.xml file but when I click on home it directly go to

http:/localhost/Myapplication/home/home.html page without asking user name and password.

 

any one know where is the problem in my configuration or I am missing anything here.

 

Thanks

tejas



Do You Yahoo!?
Yahoo! Greetings - send greetings for Easter, Passover

Reply via email to