wood burning stoves 2.0*
The moose likes Mac OS and the fly likes How to install tomcat 6 in Mac ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "How to install tomcat 6 in Mac ?" Watch "How to install tomcat 6 in Mac ?" New topic
Author

How to install tomcat 6 in Mac ?

Eman Abdo
Greenhorn

Joined: Jan 30, 2008
Posts: 9
Hi,
I want to install apache tomcat 6 - last version - in my Mac system, I have one on Windows but I never like Windows after trying Macintosh!

I looked for any article learn me how to do this, but all methods to install failed !! I don't know really where is the problem !


please If any one know how to install it step by step, I will appreciate his help ..

and I am using Tiger not Leopard


Be patient, to reach your GOAL ..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

Download the .tar.gz file (not the .zip or the .exe)

Upack it in the folder of your choice. (Most Mac people unpack it into a folder within the /Library folder).

Start it!

Yes, it's that simple.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eman Abdo
Greenhorn

Joined: Jan 30, 2008
Posts: 9
Thank you Bear for your quick answer

I did it, but it doesn't start !





Really, I don't know where is the problem exactly !!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

Your JRE_HOME variable looks suspicious. Mine startup display is:


JRE_HOME is (I think) derived from what you set JAVA_HOME to in your .bash_profile.

You may want to check that.

P.S. I know I'm only running Tomcat 5.5, but things should be the same.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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 ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Eman Abdo
Greenhorn

Joined: Jan 30, 2008
Posts: 9
Bear,
I configured JAVA_HOME as what you worte , but tomcat still sleep !!
Thank you at all, I appreciate your help so much

Ben,
Thank you for your explaination, it added to me the new ..

--------

Now, I have to change tomcat to another free server, which one do you see it is better ?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Eman Abdo:
Now, I have to change tomcat to another free server, which one do you see it is better ?


Why do you need to change to another free server?

In my opinion there isn't a better free one out there.
Some other ones are Jetty and Resin.
Eman Abdo
Greenhorn

Joined: Jan 30, 2008
Posts: 9
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 ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

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.
Eman Abdo
Greenhorn

Joined: Jan 30, 2008
Posts: 9

What a nice day !

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
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Could it be that it was the source version of Tomcat, that you had first downloaded??

Or could it be that not all *.jar and *.sh had execute privilege??


Regards, Rene Larsen
Dropbox Invite
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to install tomcat 6 in Mac ?