Actually, the problem is that a periodic Linux cron job cleans the /tmp directory and the embedded Jetty places the compiled JSP classes in this directory. Deleting these means that the compiled JSP code can no longer be run - hence no web application.
Create another directory to which Jetty can write its compiled JSP classes.
e.g. Create a directory /jetty to which JBoss server has permission to write.
Add to JBOSS_HOME/bin/run.conf the following or append to the JAVA_OPTS definition if it already exists in the file:
Jetty will now write its compiled JSP classes into that directory. You can check this by running the http://localhost:8080/jmx-console application and then going to the Linux command line and listing the contents of /jetty. You should see some directories and some Java classes in those directories.
Hope that helps.
What difference between putting compiled JSP classes in /tmp and in /jetty.
A cron job specifically cleans up the /tmp directory. It doesn't clean up the /jetty directory.
Jonlee, thank you for your help. If the JSP compiled files are written to /jetty directory, there is no files in /tmp directory. Is it neccessary to clean the /tmp directory using cron job? Can it solve the problem with JBoss application working for the continuous 2 weeks?