Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86905 - Tomcat starts web applications in current working directory of process that runs init script
Summary: Tomcat starts web applications in current working directory of process that r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Jan Brinkmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-27 16:01 UTC by Chet McNeill
Modified: 2005-03-28 02:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Init script that changes to the appropriate directory before starting tomcat (tomcat5,667 bytes, text/plain)
2005-03-27 16:04 UTC, Chet McNeill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chet McNeill 2005-03-27 16:01:52 UTC
If the Tomcat server is started from a bash session, the server uses the user's current working directory as it's CWD. When web applications are configured to use a relative working directory, they end up quite confused and can't access their own files.

I fixed this on my system by simply adding 'cd "${CATALINA_HOME}/webapps"' in the /etc/init.d/tomcat5 file (enclosed) right after the ebegin "starting tomcat" line.
Comment 1 Chet McNeill 2005-03-27 16:04:13 UTC
Created attachment 54628 [details]
Init script that changes to the appropriate directory before starting tomcat
Comment 2 Jan Brinkmann (RETIRED) gentoo-dev 2005-03-27 19:15:38 UTC
thanks for your report, i've added a 'cd ${CATALINA_BASE}/webapps' . fixed in cvs
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-03-28 02:11:44 UTC
Please, could you change the init script for 5.0.27-r4 as well? Tnx.