You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael <mi...@idtect.com> on 2002/08/20 17:32:57 UTC

Specifying location of tomcat-users.xml

I'm running tomcat from within IDEA, and I'm using the -config command
line parameter to tell tomcat where my server.xml file is located (in my
project directory).  But tomcat is looking for tomcat-users.xml in the
CATALINA_HOME directory.  Is there a command to specify a conf directory
other than CATALINA_HOME?

My motivation is I'd like to keep all the configuration files in my
project directory structure, that way I'm not dependent on the tomcat
installation and config files.

Thanks
Michael


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE : Specifying location of tomcat-users.xml

Posted by Michael <mi...@idtect.com>.
>      > I'm running tomcat from within IDEA, and I'm using the -config
>      > command line parameter to tell tomcat where my server.xml file
>      > is located (in my project directory).  But tomcat is looking
>      > for tomcat-users.xml in the CATALINA_HOME directory.  Is there
>      > a command to specify a conf directory other than CATALINA_HOME?
> 
> Set the CATALINA_BASE variable as needed.

I've tried setting it to my project's root directory (my project has a
conf directory with the server.xml and tomcat-users.xml files in it) but
when I do this, my server.xml is no longer used (my web app doesn't
exist).  When I put the CATALINA_BASE back to CATALINA_HOME, it works
fine.

I'm using Tomcat 4.0.4.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Specifying location of tomcat-users.xml

Posted by Jhair Tocancipa Triana <jh...@icon-scm.com>.
>>>>> " " == Michael  <mi...@idtect.com> writes:

     > I'm running tomcat from within IDEA, and I'm using the -config
     > command line parameter to tell tomcat where my server.xml file
     > is located (in my project directory).  But tomcat is looking
     > for tomcat-users.xml in the CATALINA_HOME directory.  Is there
     > a command to specify a conf directory other than CATALINA_HOME?

Set the CATALINA_BASE variable as needed.

--
--Jhair


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Specifying location of tomcat-users.xml

Posted by Irina Lishchenko <il...@lishchenko.de>.
On Tuesday 20 August 2002 17:32, you wrote:
> I'm running tomcat from within IDEA, and I'm using the -config command
> line parameter to tell tomcat where my server.xml file is located (in my
> project directory).  But tomcat is looking for tomcat-users.xml in the
> CATALINA_HOME directory.  Is there a command to specify a conf directory
> other than CATALINA_HOME?

I have not understood what you mean by IDEA but usually you specify the 
address of tomcat-users.xml in the Realm entry of your server.xml file. 
Default this look like
<Realm className="org.apache.catalina.realm.MemoryRealm" />
that means that default pathname for tomcat-users.xml is equal 
conf/tomcat-users.xml in CATALINA_HOME. 

But according to documentation you can specify another location of this file 
as it is shown below
<Realm className="org.apache.catalina.realm.MemoryRealm" 
pathname="/path/to/your/tomcat-users.xml/file"/>

Read documentation page
http://localhost:8080/tomcat-docs/config/realm.html


>
> My motivation is I'd like to keep all the configuration files in my
> project directory structure, that way I'm not dependent on the tomcat
> installation and config files.

If I remember right Tomcat4.1.x allows to specify special context 
configuration files which can be located in project directory structure as 
you name it, for each application own context configuration file where 
whithin Context entry you can specify Realm for this application

My english is not so good but hope it is understandable and you have some 
matherial to explore

ilis

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>