-
1. Re: WAR context disappearing strangly
frankgrimes May 26, 2003 10:09 AM (in response to bavod)We had the same problem.
I stumbled across this in a jetty FAQ somewhere and it solved our problem. (FYI, we were getting this behaviour on AIX)
"Everything works fine for a while and then my content suddenly disappears.
---------------------------------------------------------------------------
You probably have a process periodically sweeping old files out of tmp.
Here is a MacOSX-specific solution:
Q: JBoss3/Jetty on Mac OS X stops serving JSPs and displays an directory listing instead of my site. What's going on?
A: On Mac OS X, a file called "/etc/periodic/daily/500.daily" describes how often /tmp files are to be cleaned up.
By default, it wipes files after three days.
If you do not specify a temporary directory explicitly for JBoss/Jetty with the startup parameter "java.io.tmpdir" for Jetty to unpack to, it will default to the temp directory for the system.
On Mac OS X, this is "/tmp".
Modify your JBoss startup script "run.sh" to include a "java.io.tmpdir" system property: like so: JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -Djava.io.tmpdir=$JBOSS_HOME/server/default/tmp" (or wherever you want that is not being wiped clean regularly.) " -
2. Re: WAR context disappearing strangly
jonlee May 26, 2003 7:27 PM (in response to bavod)The same also happens in Linux. Linux jobs sweep through and cleanup /tmp. Create your own directory and set JAVA_OPTS with the tmpdir in run.sh.
e.g. Replace the line
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
With:
JAVA_OPTS="$JAVA_OPTS -Djava.io.tmpdir=/jetty -Dprogram.name=$PROGNAME"
Here the temp directory for Jetty is /jetty.
Hope it helps.