Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Does WTP reset CATALINA_HOME at "Run at Server"-time?
Does WTP reset CATALINA_HOME at "Run at Server"-time? [message #174507] Sat, 15 July 2006 08:50 Go to next message
Graeme Harker is currently offline Graeme HarkerFriend
Messages: 12
Registered: July 2009
Junior Member
If I "Run at Server" WTP appears to "publish" my application to a secret
folder in the workspace. If my Tomcat app uses the CATALINA_HOME
environment variable as the basename of pathnames for file IO then it's
going to get confused if I "Run at Server" unless WTP automatically
resets CATALINA_HOME to point to the secret folder in the workspace.
Does WTP do this or do I have to set CATALINA_HOME explicitly?
Re: Does WTP reset CATALINA_HOME at "Run at Server"-time? [message #174515 is a reply to message #174507] Sat, 15 July 2006 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gene.rockhoppertech.com

Graeme Harker wrote:
> If I "Run at Server" WTP appears to "publish" my application to a secret
> folder in the workspace. If my Tomcat app uses the CATALINA_HOME
> environment variable as the basename of pathnames for file IO then it's
> going to get confused if I "Run at Server" unless WTP automatically
> resets CATALINA_HOME to point to the secret folder in the workspace.
> Does WTP do this or do I have to set CATALINA_HOME explicitly?

The default config is to run it from the workspace. You can change that.
Double click on the server.

Your code that does file IO based on an environment variable - or a
directory path - in a web app has to go. That is not the way to do it -
as you just discovered.
Re: Does WTP reset CATALINA_HOME at "Run at Server"-time? [message #174522 is a reply to message #174515] Sat, 15 July 2006 17:59 Go to previous messageGo to next message
Graeme Harker is currently offline Graeme HarkerFriend
Messages: 12
Registered: July 2009
Junior Member
Gene De Lisa wrote:
> Graeme Harker wrote:
>> If I "Run at Server" WTP appears to "publish" my application to a
>> secret folder in the workspace. If my Tomcat app uses the
>> CATALINA_HOME environment variable as the basename of pathnames for
>> file IO then it's going to get confused if I "Run at Server" unless
>> WTP automatically resets CATALINA_HOME to point to the secret folder
>> in the workspace. Does WTP do this or do I have to set CATALINA_HOME
>> explicitly?
>
> The default config is to run it from the workspace. You can change that.
> Double click on the server.
>
> Your code that does file IO based on an environment variable - or a
> directory path - in a web app has to go. That is not the way to do it -
> as you just discovered.

OK, but what about Tomcat itself (such as its logfiles) and libraries
that the app (such as log4j), might these things not depend on
CATALINA_HOME being set correctly? Perhaps not, it just makes me
uncomfortable that the environment isn't set correctly for WTP's "test
run" mode.
Re: Does WTP reset CATALINA_HOME at "Run at Server"-time? [message #174668 is a reply to message #174507] Mon, 17 July 2006 13:41 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
The default behavior is to run with a split CATALINA_HOME and
CATALINA_BASE, which supports running multiple instances of Tomcat from
a single installation. To see what is being used, double-click on the
server in the Servers view, click on the "Open launch configuration" in
the configuration editor that appears, then switch to the Arguments tab
of the launch configuration dialog. Note the values for catalina.base
and catalina.home in the VM Arguments field. By unchecking the "Run
modules directly from the workspace" option in the Tomcat configuration
editor, catalina.base and catalina.home will both be set to point to
your Tomcat installation. Be aware that with this configuration, the
files found under the Servers project in your workspace for that Tomcat
server will overwrite the equivalent files in you installation every
time you start the server. This implies that for the most part, you
will need to manage your Tomcat server from within Eclipse.

Cheers,
Larry


Graeme Harker wrote:
> If I "Run at Server" WTP appears to "publish" my application to a secret
> folder in the workspace. If my Tomcat app uses the CATALINA_HOME
> environment variable as the basename of pathnames for file IO then it's
> going to get confused if I "Run at Server" unless WTP automatically
> resets CATALINA_HOME to point to the secret folder in the workspace.
> Does WTP do this or do I have to set CATALINA_HOME explicitly?
Re: Does WTP reset CATALINA_HOME at "Run at Server"-time? [message #174890 is a reply to message #174668] Wed, 19 July 2006 11:24 Go to previous message
Graeme Harker is currently offline Graeme HarkerFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks guys. I appreciate the replies.
Previous Topic:Tomcat publishing "forgets" files in WEB-INF
Next Topic:why build/classes and not WEB-INF/classes?
Goto Forum:
  


Current Time: Thu Mar 28 17:19:34 GMT 2024

Powered by FUDForum. Page generated in 0.04953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top