On a Unix system, Tomcat first looks for a JRE_HOME setting (a full JDK is no longer needed with Tomcat). If it doesn't find one, then it looks for a JAVA_HOME setting. Either would point the root directory of your Java installation.
From tomcat/bin/setclasspath.sh:
[ February 02, 2008: Message edited by: Ben Souther ]
Ben, because I don't know why does tomcat hate me ! In fact, I am familiar with tomcat because I use it in Windows I kept trying to run it in Mac OS for 2 weeks !! :roll:
If you or anyone has any suggestion or expectation about the reason of my problem, please tell me ..
Thanks to all [ February 03, 2008: Message edited by: Eman Abdo ]
If this were my issue, I would start with 4 things.
1.) Verify that the JAVA_HOME variable is correct. I would do this by trying to run Java with it:
I you see "Command not found" or anything other than the Java Usage mesage, then you know it's incorrect.
2.) I would look at the logs in tomcat/logs to see what if anything is going wrong.
3.) I would verify that the user under which Tomcat is running has sufficient privileges to run and write to the necessary directories (work and logs).
4.) I would check to see if Tomcat really isn't running. Did you run ps to see if there is a process for it? Did you run netstat to see if it's bound to the expected port? Did you try pinging localhost to insure that it's set up on your machine and pointing to 127.0.0.1?
I would do all of these things before I would start looking for another container.
1.) Verify that the JAVA_HOME variable is correct.
Indeed. If JAVA_HOME is not correct, you won't have any better luck with any other container. This is not a Tomcat issue, but an issue with your getting your environment set up correctly.
The problem was solved.. just I replaced tomcat by another one from another site - not apache site.. and it runs as simple as what Bear said !
I don't know what is the problem exactly .. but I noticed something, the library of the package from apache site doesn't contain jar files for servlet and jsp and other ones ! This is something not normal !
Thank you Bear, thank you Ben... You are great helpful men