• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mac OSX Tomcat config

 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anywhere in the Head First book, a section on how to set up jakarta-tomcat-5.* on the Mac OSX?

Can any recommend any URLs? I have the book, entitled, "Mac OSX for Java Geeks", but its really not that informative, regarding this issue.

I noticed how a lot of the screen shots in Head First Servlets & JSP, that the examples were run on a browser using Mac OSX... Cool deal!

Cheers,
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy!

I'm assuming you already downloaded it, but if not... go to:
http://jakarta.apache.org/site/binindex.cgi

Scroll down to the 5.0.28 zip and select it to download.

Unzip and put Tomcat wherever you like, and I *think* all you need are two environment variables. You *might* have to change the permissions on the Tomcat directories; I can't remember, so you'll have to check.

I put my tomcat in a directory named Applications2/tomcat
where "tomcat" is actually an alias to the *real* Tomcat home directory.
But you can just use the real Tomcat home directory name here, or use an alias as I did.

Here's what I have in my .tcshrc file related to Tomcat, assuming the default installation of Java that comes with OSX.
============
setenv JAVA_HOME /usr
setenv TOMCAT_HOME /Users/kathy/Applications2/tomcat

That should be it. We don't set paths or classpaths for this in the book; we kept them all at the command line so that it's very explicit. You could, of course, set these yourself.

cheers,
Kathy (currently lusting after the new G5 iMac... I just saw it in the Apple store today.)
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the insight, Kathy...

Where do I place my .tshrc file? Also, can't I just use .bash_profile?

And, in addition, I thought that Tomcat's sys user env variable was CATALINA_HOME instead of TOMCAT_HOME....

Many, many thanks, once again!

I like the way you included XP (story, refactor, etc.) in the book....

I currently introduced XP to my company and the product owners have started using the planning game and incremental iterative development for some of their processes...

All the best,
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Unssee : )

I'm using the default OSX shell (which uses a .tcshrc); but wherever and however you set your env variables is fine. You just need to make sure you have JAVA_HOME to the JDK home directory and TOMCAT_HOME to the top-level Tomcat directory. That's it. You should *not* need CATALINA_HOME if you're running standalone Tomcat (i.e. not configuring it into anything else).

Let me know...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic