You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mart Käsper <ma...@netsoftlund.se> on 2003/04/08 12:03:45 UTC

Setting system properties for Tomcat as NT service ?

Hi,

I'm running Tomcat 4.1.24 (invoked from IIS) on a Win2K box as a NT 
service. It starts OK and seems to execute my classes fine, but my 
classes cannot find the system properties I've tried to set.

What I did was (roughly):
* installed Tomcat, instructing it to register as a service
* set CATALINA_OPTS as an environment variable containing my -D... settings
* restarted Tomcat and invoking the servlet

but my environment variables were not found (System.getProperty() 
returned null).

I even tried editing catalina.bat just to get some clues, but it just 
left me more confused - nothing happened.

Is it so that I should have set CATALINA_OPTS before installing Tomcat, 
or what ? If it is - how do I re-register the Tomcat service ?

Thanks in advance,

======================================================================
    Mart Käsper                 E-mail            : mart@netsoftlund.se
    Netsoft Lund AB
    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
======================================================================

    This e-mail is a work of fiction. Names, characters, places and
    incidents are products of the author's imagination or are used
    fictitiously. Any resemblance to actual events or locales or
    persons, living or dead, is entirely coincidental.

    Also, no animals were hurt during the creation and transfer of
    this e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Setting system properties for Tomcat as NT service ?

Posted by Mart Käsper <ma...@netsoftlund.se>.
Hi,

just to make things clear - the environment variable CATALINA_OPTS is 
set properly, but IT IS NOT USED BY TOMCAT ! Could it be that the 
service registration caches the startup command (including CATALINA_OPTS) ?

John Klancer wrote:
> No, that's what I would consider the correct way. If you open up the
> command prompt and the variable is available, you know it worked. That's
> the only advice I am able to give, as I am not very experienced with
> Tomcat yet.
> 
>  - John
> 
> -----Original Message-----
> From: Mart Käsper [mailto:mart@netsoftlund.se] 
> Sent: 08 April 2003 11:55
> To: Tomcat Users List
> Subject: Re: Setting system properties for Tomcat as NT service ?
> 
> 
> Hi,
> 
> I set it through 'my computer->properties->advanced->environment 
> variables' but since it didn't have any effect it probably wasn't the 
> right way to go ... or ?
> 
> Any hints, anyone ?
> 
> John Klancer wrote:
> 
>>I didn't need to set CATALINA_OPTS myself, but how did you set the 
>>environment variables? From the command line or right click my
>>computer->properties->advanced->environment variables ?
>>
>>-----Original Message-----
>>From: Mart Käsper [mailto:mart@netsoftlund.se]
>>Sent: 08 April 2003 11:04
>>To: tomcat-user@jakarta.apache.org
>>Subject: Setting system properties for Tomcat as NT service ?
>>
>>
>>Hi,
>>
>>I'm running Tomcat 4.1.24 (invoked from IIS) on a Win2K box as a NT
>>service. It starts OK and seems to execute my classes fine, but my 
>>classes cannot find the system properties I've tried to set.
>>
>>What I did was (roughly):
>>* installed Tomcat, instructing it to register as a service
>>* set CATALINA_OPTS as an environment variable containing my -D... 
>>settings
>>* restarted Tomcat and invoking the servlet
>>
>>but my environment variables were not found (System.getProperty()
>>returned null).
>>
>>I even tried editing catalina.bat just to get some clues, but it just
>>left me more confused - nothing happened.
>>
>>Is it so that I should have set CATALINA_OPTS before installing 
>>Tomcat,
>>or what ? If it is - how do I re-register the Tomcat service ?
>>
>>Thanks in advance,
>>
>>======================================================================
>>    Mart Käsper                 E-mail            :
> 
> mart@netsoftlund.se
> 
>>    Netsoft Lund AB
>>    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
>>    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
>>======================================================================
>>
>>    This e-mail is a work of fiction. Names, characters, places and
>>    incidents are products of the author's imagination or are used
>>    fictitiously. Any resemblance to actual events or locales or
>>    persons, living or dead, is entirely coincidental.
>>
>>    Also, no animals were hurt during the creation and transfer of
>>    this e-mail.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 
> 
> 


-- 
======================================================================
    Mart Käsper                 E-mail            : mart@netsoftlund.se
    Netsoft Lund AB
    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
======================================================================

    This e-mail is a work of fiction. Names, characters, places and
    incidents are products of the author's imagination or are used
    fictitiously. Any resemblance to actual events or locales or
    persons, living or dead, is entirely coincidental.

    Also, no animals were hurt during the creation and transfer of
    this e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Setting system properties for Tomcat as NT service ?

Posted by John Klancer <ca...@calhoun.plus.com>.
No, that's what I would consider the correct way. If you open up the
command prompt and the variable is available, you know it worked. That's
the only advice I am able to give, as I am not very experienced with
Tomcat yet.

 - John

-----Original Message-----
From: Mart Käsper [mailto:mart@netsoftlund.se] 
Sent: 08 April 2003 11:55
To: Tomcat Users List
Subject: Re: Setting system properties for Tomcat as NT service ?


Hi,

I set it through 'my computer->properties->advanced->environment 
variables' but since it didn't have any effect it probably wasn't the 
right way to go ... or ?

Any hints, anyone ?

John Klancer wrote:
> I didn't need to set CATALINA_OPTS myself, but how did you set the 
> environment variables? From the command line or right click my
> computer->properties->advanced->environment variables ?
> 
> -----Original Message-----
> From: Mart Käsper [mailto:mart@netsoftlund.se]
> Sent: 08 April 2003 11:04
> To: tomcat-user@jakarta.apache.org
> Subject: Setting system properties for Tomcat as NT service ?
> 
> 
> Hi,
> 
> I'm running Tomcat 4.1.24 (invoked from IIS) on a Win2K box as a NT
> service. It starts OK and seems to execute my classes fine, but my 
> classes cannot find the system properties I've tried to set.
> 
> What I did was (roughly):
> * installed Tomcat, instructing it to register as a service
> * set CATALINA_OPTS as an environment variable containing my -D... 
> settings
> * restarted Tomcat and invoking the servlet
> 
> but my environment variables were not found (System.getProperty()
> returned null).
> 
> I even tried editing catalina.bat just to get some clues, but it just
> left me more confused - nothing happened.
> 
> Is it so that I should have set CATALINA_OPTS before installing 
> Tomcat,
> or what ? If it is - how do I re-register the Tomcat service ?
> 
> Thanks in advance,
> 
> ======================================================================
>     Mart Käsper                 E-mail            :
mart@netsoftlund.se
>     Netsoft Lund AB
>     Bredgatan 17                Tel (in place)    : +46 46  19 04 95
>     SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
> ======================================================================
> 
>     This e-mail is a work of fiction. Names, characters, places and
>     incidents are products of the author's imagination or are used
>     fictitiously. Any resemblance to actual events or locales or
>     persons, living or dead, is entirely coincidental.
> 
>     Also, no animals were hurt during the creation and transfer of
>     this e-mail.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
======================================================================
    Mart Käsper                 E-mail            : mart@netsoftlund.se
    Netsoft Lund AB
    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
======================================================================

    This e-mail is a work of fiction. Names, characters, places and
    incidents are products of the author's imagination or are used
    fictitiously. Any resemblance to actual events or locales or
    persons, living or dead, is entirely coincidental.

    Also, no animals were hurt during the creation and transfer of
    this e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Setting system properties for Tomcat as NT service ?

Posted by Mart Käsper <ma...@netsoftlund.se>.
Hi,

I set it through 'my computer->properties->advanced->environment 
variables' but since it didn't have any effect it probably wasn't the 
right way to go ... or ?

Any hints, anyone ?

John Klancer wrote:
> I didn't need to set CATALINA_OPTS myself, but how did you set the
> environment variables? From the command line or right click my
> computer->properties->advanced->environment variables ?
> 
> -----Original Message-----
> From: Mart Käsper [mailto:mart@netsoftlund.se] 
> Sent: 08 April 2003 11:04
> To: tomcat-user@jakarta.apache.org
> Subject: Setting system properties for Tomcat as NT service ?
> 
> 
> Hi,
> 
> I'm running Tomcat 4.1.24 (invoked from IIS) on a Win2K box as a NT 
> service. It starts OK and seems to execute my classes fine, but my 
> classes cannot find the system properties I've tried to set.
> 
> What I did was (roughly):
> * installed Tomcat, instructing it to register as a service
> * set CATALINA_OPTS as an environment variable containing my -D...
> settings
> * restarted Tomcat and invoking the servlet
> 
> but my environment variables were not found (System.getProperty() 
> returned null).
> 
> I even tried editing catalina.bat just to get some clues, but it just 
> left me more confused - nothing happened.
> 
> Is it so that I should have set CATALINA_OPTS before installing Tomcat, 
> or what ? If it is - how do I re-register the Tomcat service ?
> 
> Thanks in advance,
> 
> ======================================================================
>     Mart Käsper                 E-mail            : mart@netsoftlund.se
>     Netsoft Lund AB
>     Bredgatan 17                Tel (in place)    : +46 46  19 04 95
>     SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
> ======================================================================
> 
>     This e-mail is a work of fiction. Names, characters, places and
>     incidents are products of the author's imagination or are used
>     fictitiously. Any resemblance to actual events or locales or
>     persons, living or dead, is entirely coincidental.
> 
>     Also, no animals were hurt during the creation and transfer of
>     this e-mail.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
======================================================================
    Mart Käsper                 E-mail            : mart@netsoftlund.se
    Netsoft Lund AB
    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
======================================================================

    This e-mail is a work of fiction. Names, characters, places and
    incidents are products of the author's imagination or are used
    fictitiously. Any resemblance to actual events or locales or
    persons, living or dead, is entirely coincidental.

    Also, no animals were hurt during the creation and transfer of
    this e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Setting system properties for Tomcat as NT service ?

Posted by John Klancer <ca...@calhoun.plus.com>.
I didn't need to set CATALINA_OPTS myself, but how did you set the
environment variables? From the command line or right click my
computer->properties->advanced->environment variables ?

-----Original Message-----
From: Mart Käsper [mailto:mart@netsoftlund.se] 
Sent: 08 April 2003 11:04
To: tomcat-user@jakarta.apache.org
Subject: Setting system properties for Tomcat as NT service ?


Hi,

I'm running Tomcat 4.1.24 (invoked from IIS) on a Win2K box as a NT 
service. It starts OK and seems to execute my classes fine, but my 
classes cannot find the system properties I've tried to set.

What I did was (roughly):
* installed Tomcat, instructing it to register as a service
* set CATALINA_OPTS as an environment variable containing my -D...
settings
* restarted Tomcat and invoking the servlet

but my environment variables were not found (System.getProperty() 
returned null).

I even tried editing catalina.bat just to get some clues, but it just 
left me more confused - nothing happened.

Is it so that I should have set CATALINA_OPTS before installing Tomcat, 
or what ? If it is - how do I re-register the Tomcat service ?

Thanks in advance,

======================================================================
    Mart Käsper                 E-mail            : mart@netsoftlund.se
    Netsoft Lund AB
    Bredgatan 17                Tel (in place)    : +46 46  19 04 95
    SE-222 21 Lund, Sweden      Tel (on the road) : +46 70 319 04 95
======================================================================

    This e-mail is a work of fiction. Names, characters, places and
    incidents are products of the author's imagination or are used
    fictitiously. Any resemblance to actual events or locales or
    persons, living or dead, is entirely coincidental.

    Also, no animals were hurt during the creation and transfer of
    this e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org