tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shlomi sarfati" <shl...@navixo.com>
Subject RE: A Little message for Carlos !!!!
Date Thu, 22 Feb 2001 08:34:16 GMT
I hope I can help you guys
 I tried  this one on my win 2000 and it is working good .
 in your web.xml document you should add a <security-constraint> entry ,
define the url pattern that you want to protect  ( e.g 'myServlet' )
add the http methods that you want the security will work on (e.g: GET, POST
... )
after this you should determine who should log in with the  <login-config>
tag (e.g Admin)
the <realm-name> is in the tomcat users file .


<web-app>

    <security-constraint>
      <web-resource-collection>
         <web-resource-name>Protected Area</web-resource-name>
         <url-pattern>/myServlet</url-pattern>
         <http-method>DELETE</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
         <http-method>PUT</http-method>
      </web-resource-collection>
      <auth-constraint>
         <role-name>admin</role-name>
      </auth-constraint>
    </security-constraint>

    <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>Admin</realm-name>
    </login-config>
  .
  .
  .
  .
<web-app>
  -----Original Message-----
  From: Negrini Lilian [mailto:lilian@side-info.fr]
  Sent: Mon, April 07, 1980 1:17 AM
  To: tomcat-user@jakarta.apache.org
  Subject: A Little message for Carlos !!!!


  Hello !!!!

   I have the same problem than you, in configuring Tomcat. I want to
protect some pages with
  Login & password .. if someone have an solving for this, please forward it
!!!

   Thanks .... a lot !!!!

   Lilian

   lilian@Side-info.fr

Mime
View raw message