Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

FORM authentication with TomCat 5 - jwsdp-1.4

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I'm just finished with my little apps (4 jsp and 3 servlets !) and I am trying to implement a simple authentication procedure ...

I decided to try a "standard" FORM authentication since it is depicted as a very mere job !

The problem is that whatever I put in my DD web.xml, the server let me access to my JSP and Servlets w/o any request for authentication.

In order to test the server I tried the autentication example from TomCat (/jsp-example/security/protected/) and it works fine ; I guess that the configuration file server.xml is correct.

Herebelow is my DD web.xml and my tomcat-users.xml.

Thanks for any hints from anywhere that could help me find what I've missed

web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns = ""

<servlet-name>Select Ordres</servlet-name>
<servlet-name>Select Ordres</servlet-name>
<servlet-name>MaJ DataBase</servlet-name>
<servlet-name>MaJ DataBase</servlet-name>
<servlet-name>Selection Ordres</servlet-name>
<servlet-name>Selection Ordres</servlet-name>
<servlet-name>Statut Ordres</servlet-name>
<servlet-name>Statut Ordres</servlet-name>
<display-name>Tomcat Server Configuration Security Constraint</display-name>

<!-- Default login configuration uses form-based authentication -->
<realm-name>Tomcat Server Configuration Form-Based Authentication Area</realm-name>

tomcat-users.xml :
==========================================================================<?xml version='1.0' encoding='utf-8'?>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin" description="Administration Tool users"/>
<role rolename="guest" description="affichage seulement"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="role1" fullName="role guest pour l'affichage"/>
<user username="lsalse" password="lsalse" fullName="Laurent SALSE" roles="admin,manager"/>
    Bookmark Topic Watch Topic
  • New Topic