no, you will have to restart Tomcat. There are shell extensions provided
with Tomcat 4.0 that I believe allow you to access its internal objects in
order to do this type of thing, however, that is hearsay and I am sorry i
cannot offer you more info.
chanoch
----- Original Message -----
From: "ghkazi" <ghkazi@h...>
To: "Servlets" <servlets@p...>
Sent: Sunday, June 23, 2002 9:42 AM
Subject: [servlets] Re: Access to tomcat-user.xml
> yes i agree with u chanoch
> that tomcat perfroms all types of authentications (basic, digest, SSl etc)
> automatically, but it's only authenticate those users which are already
> defined in tomcat-user.xml file at statartup only. so i will redefine Q
that
> if i edit tomcat-user.xml file in some way to include new users, then is
> there any way that these changings takes place while tomcat is running and
i
> don't have to restart it for new users.
> thnx
>
> ----- Original Message -----
> From: chanoch <mail@c...>
> To: Servlets <servlets@p...>
> Sent: Friday, June 14, 2002 4:58 AM
> Subject: [servlets] Re: Access to tomcat-user.xml
>
>
> > read up on authentication on the tomcat site - there is an automatic way
> of
> > doing this. You assign the security to your servlet / jsps in the
web.xml
> > file and then only people with that security level can get in - you dont
> > really have to do anything more. You can set a login page which tomcat
> will
> > read and process the login for you but it must has j_username and
> j_password
> > as the variables with the appropriate values - i.e. john and doe. I
> promise
> > that if you read the docs you are more likely to understand how this
works
> >
> > chanoch
> >
> > ----- Original Message -----
> > From: "Nikolas Sakic" <beelzabeb@c...>
> > To: "Servlets" <servlets@p...>
> > Sent: Saturday, June 08, 2002 10:25 PM
> > Subject: [servlets] Access to tomcat-user.xml
> >
> >
> > > Hello,
> > > I have a quick question, its more like asking for suggestion. I have
a
> > > servlet that logs user in, to access our company's 'Tech Support'
> > > database. I am writing a login servlet, the username/password, I don't
> > > with to put in the database, can I put in tomcat-user.xml like:
> > > <user name="john" password="doe" roles="admin"/>
> > >
> > > How do I access the above in my Servlet?
> > >
> > >
> > > OR
> > >
> > >
> > > I can define them in my web.xml file as the context parameter like:
> > >
> > > <init-param>
> > > <param-name>username</param-name>
> > > <param-value>john</param-value>
> > > </init-param>
> > > <init-param>
> > > <param-name>password</param-name>
> > > <param-value>doe</param-value>
> > > </init-param>
> > >
> > > and access them using getinitParameters() methods.
> > >
> > > I am just avoiding accessing the database at this stage and retrieving
> > > them and authenticating. Does anyone has any ideas?
> > >
> > > Thanx in advance,
> > >
> > > regards,
> > > Nik
> > >
> > >
> > >
> > >
> >
> >
> >
>
>