Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Config Problems with Tomcat 4.1

Status
Not open for further replies.

tomyuser

Programmer
May 3, 2005
1
DE
Hi,
I´m new to tomcat... Most time we´re using webSphere from IBM but now we want to switch but there are some Problem I don´t get fixed:
1. While TC running as a service I try to open a file(User.dat) located in CATALINA_HOME/Data Folder. I alway get the Errormessage FileNotFound and the Path the javaClass is looking for User.dat is c:\windows\system32 and not CATALINA_HOME!?!?!?
If I start TC with a shortcut to startup.bat and fill in the "start in:"-property with the CATALINA_HOME path in works well, but I doens´t work, when TC is started as a Service...

2. My Prog need a Systemvariable named MODE. Is there a possibility to declare this MODE-variable as a Systemvariable in Tomcat???

Thanx for the Help
 
Hi there.
Easy on the question marks/exclamation marks fella.

When running tomcat as a service, the "start home" is indeed system32. This is as expected with all windows services. I would change programmatically how you access a temporary dir in your webapp - perhaps you could use the call

getServletConfig().getServletContext.getRealPath("/")

to get the path of your webapp's root directory and then work back from there ...

If you need a system wide environment variable, then I would set it the normal way under windows.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top