Salut  Michele,

Thanks for the tip. I didn't know about this option.
However, I found what the problem was.  If you look at my web.xml file, you'll see I 
fogot the 's'  in <security-conStraint>.
The most  incredible thing is that  Tomcat 5 didn't complain at all !!!
And guess how I figured out  ? I though there was a bug in the container so I 
downloaded Tomcat 4.
And immediately this version complained about  the mispelling...
I'm quite surprised (and disappointed) because I did change the level of traces in the 
server.xml and no valuable information came out :-(.
I hope this post will avoid other newbies to be stuck like I was.

Merci,

Laurent

> Message du 23/07/04 à 21h36
> De : "Michele Ouellet" <[EMAIL PROTECTED]>
> A : "Laurent Le Moux" <[EMAIL PROTECTED]>
> Copie à : 
> Objet : Re: BASIC authentication not working, PLEASE HELP !
> 
> Salut Laurent,
> 
> Did you start tomcat with the -security flag on the command line?
> 
> Michele Ouellet
> Stelvio Inc.
> 
> ----- Original Message -----
> From: "Laurent Le Moux" <[EMAIL PROTECTED]>
> Newsgroups: comp.lang.java.security
> Sent: Thursday, July 22, 2004 10:27 AM
> Subject: BASIC authentication not working, PLEASE HELP !
> 
> 
> > Hye !
> >
> > I struggle for two days now with Tomcat 5 BASIC authentication.
> >
> > I read many posts about the problem but most of the people seem to
> > have a login window appearing. I don't :-(
> >
> > jsp security examples, manager and admin work fine but my application
> > just acts as if no authentication was required...
> >
> > I really don't see what's wrong with my config files.
> >
> > Can anybody help me, please ?!!!!!!!!!!
> >
> > Hereafter are the xml files :
> >
> > ----------------------------------------------------------
> >
> > tomcat-users.xml :
> >
> > <?xml version='1.0' encoding='utf-8'?>
> > <tomcat-users>
> >   <role rolename="tomcat"/>
> >   <role rolename="role1"/>
> >   <role rolename="standard"/>
> >   <role rolename="manager"/>
> >   <user username="llemoux" password="llemoux"
> > roles="standard,manager"/>
> >   <user username="tomcat" password="tomcat" roles="tomcat"/>
> >   <user username="both" password="tomcat" roles="tomcat,role1"/>
> >   <user username="role1" password="tomcat" roles="role1"/>
> > </tomcat-users>
> >
> > ----------------------------------------------------------
> >
> > web.xml :
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <web-app version="2.4">
> >
> >   <security-contraint>
> >     <web-resource-collection>
> >       <url-pattern>/*</url-pattern>
> >     </web-resource-collection>
> >     <auth-constraint>
> >       <role-name>standard</role-name>
> >     </auth-constraint>
> >   </security-contraint>
> >
> >   <login-config>
> >     <auth-method>BASIC</auth-method>
> >   </login-config>
> >
> >   <security-role>
> >     <role-name>standard</role-name>
> >   </security-role>
> >
> > </web-app>
> >
> > ----------------------------------------------------------
> >
> > server.xml :
> >
> > <Server port="8005" shutdown="SHUTDOWN">
> >   <GlobalNamingResources>
> >     <!-- Used by Manager webapp -->
> >     <Resource name="UserDatabase" auth="Container"
> >               type="org.apache.catalina.UserDatabase"
> >       description="User database that can be updated and saved">
> >     </Resource>
> >     <ResourceParams name="UserDatabase">
> >       <parameter>
> >         <name>factory</name>
> >         <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
> >       </parameter>
> >       <parameter>
> >         <name>pathname</name>
> >         <value>conf/tomcat-users.xml</value>
> >       </parameter>
> >     </ResourceParams>
> >   </GlobalNamingResources>
> >
> >   <Service name="Catalina">
> >     <Connector port="8080" />
> >
> >     <!-- This is here for compatibility only, not required -->
> >     <Connector port="8009" protocol="AJP/1.3" />
> >
> >     <Engine name="Catalina" defaultHost="localhost">
> >       <Logger className="org.apache.catalina.logger.FileLogger"/>
> >
> >       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> >              resourceName="UserDatabase" />
> >
> >       <Host name="localhost" appBase="webapps"/>
> >
> >       <DefaultContext>
> >
> >         <Resource name="jdbc/JSDB" auth="Container"
> >   type="javax.sql.DataSource"/>
> > <ResourceParams name="jdbc/JSDB">
> >   <parameter>
> >     <name>factory</name>
> >     <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>maxActive</name>
> >     <value>3</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>maxIdle</name>
> >     <value>1</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>username</name>
> >     <value>jSDB</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>password</name>
> >     <value>jSDB</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>driverClassName</name>
> >     <value>org.hsqldb.jdbcDriver</value>
> >   </parameter>
> >
> >   <parameter>
> >     <name>url</name>
> >     <value>jdbc:hsqldb:hsql://localhost</value>
> >   </parameter>
> > </ResourceParams>
> >
> >       </DefaultContext>
> >     </Engine>
> >   </Service>
> > </Server>
> 
> 
------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to