Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Tomcat 4.0 and 10.1 Apps
Here is a working solution in how to setup Tomcat 4.0 on 10.1 to run locally:

Before you start with the steps below put your current version of Stuffit Expander into the trash can. You can put it back after you are through with the installing. [Editor's note: I think you could also just make sure that you uncheck "tar" and "gz" files in Expander's "Internet" prefs, but haven't tested that myself.]

Read the rest of this article for a step-by-step on getting Tomcat running locally. I am working on a solution to set up Tomcat with Apache at the moment and will post a follow up on this. If anyone has Tomcat 4.0 with Apache on 10.1 running, please post a solution or any helpful comments.


How to install Tomcat on OS X 10.1:
  1. Open the terminal and get root access.
    Example: [co3029016-a:~] christia% su
    Password:

  2. Navigate to the folder you want tomcat running; my path is /Library/WebServer/
  3. Get the jakarta-tomcat-4.0.tar.gz build:
    curl -O http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/jakarta-tomcat-4.0.tar.gz
  4. Rename the file jakarta-tomcat-4.0.tar.gz to jakarta-tomcat-4.0.tar
  5. Unzip the file: gnutar zxf jakarta-tomcat-4.0.tar
  6. Set your environment for CATALINA_HOME and JAVA_HOME:
    setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
    setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/

  7. Navigate to the bin directory in your jakarta-tomcat-4.0 folder and type "./startup.sh" in the terminal or call it with the CATALINA_HOME variable.
  8. Open your browser and type "http://localhost:8080/" and you will see the index page of your tomcat folder.
To keep the environment variables after every restart, you have to create a .tcshrc file into your home directory (note, that the "." dot in the beginning of the file name is neccessary). You can put all your stuff into that file:
  1. Open the Terminal (by default you are in your home directory, to make that sure try pwd (print working directory) to show you your current path. If it is not your home directory change into it by cd $HOME)
  2. Create the .tcshrc file: touch .tcshrc
  3. Edit the .tcshrc file: open -e .tcshrc
  4. Enter the following lines:
    setenv CATALINA_HOME /Library/WebServer/jakarta-tomcat-4.0
    setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home/
  5. Don't forget to enter a return after the last line.
  6. Save it and restart the Terminal
Now you have the variables predefined.
    •    
  • Currently 4.67 / 5
  You rated: 5 / 5 (3 votes cast)
 
[3,943 views]  

Tomcat 4.0 and 10.1 | 5 comments | Create New Account
Click here to return to the 'Tomcat 4.0 and 10.1' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
But if you are lazy...
Authored by: Anonymous on Oct 07, '01 07:29:14PM

I think the work many put into acquiring and using open source software is wonderful and I have enjoyed doing that many times. However, sometimes, it's not just Apache I want to add, but TomCat, AND PHP and.. well, you get the idea- it can get complicated when they need to be configured together. Recently, on a whim, I tried the pre-packaged software from OpenOSX.com. I bought the Open Web install which includes Apache, TomCat 4.0, SSL, PHP and MySQL. Yes, I paid $30. But I saved myself a lot of time right off the bat, and should I have to re-install, I can just refer to their installer. And yes! there is an uninstaller in case you get cold feet.
Also for TomCat, there is a nice GUI startup program called TomCatX. It works well and, especially if you run under a root controlled port, allows for easy root startup through another handy program, Pseudo.



[ Reply to This | # ]
Tomcat & Cocoon
Authored by: mac_guy on Mar 21, '02 08:15:03PM

Thanks for the tip about dumping Stuffit. From the Tomcat webpage (which warns that OSX can't gunzip the files), I guessed that Stuffit was the cause. I was about to test the theory myself when I searched here and found your hint. Dead on. When Stuffit ungzip'd the files, Tomcat failed, when I issued commands the Terminal to ungzip, that version of Tomcat worked.

Unfortunately, I can't say the same for Cocoon. Does anyone know what these screen-filling errors mean? And how to fix it?

root cause

java.lang.NoClassDefFoundError: javax/xml/transform/URIResolver
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1631)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:926)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.avalon.excalibur.component.ExcaliburComponentManager.configure(ExcaliburComponentManager.java:408)
at org.apache.cocoon.Cocoon.configure(Cocoon.java:406)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:267)
at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:991)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:308)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:496)



[ Reply to This | # ]
Tomcat & Cocoon
Authored by: rcw3 on May 21, '02 10:16:14PM
Actually, not only can you not let stuffit do the extraction, but you need to make sure you use gnutar and not tar. Both seem to come with MacOSX.

[ Reply to This | # ]
Tomcat and 10.2
Authored by: kehret on Sep 10, '02 11:25:26AM

Has anyone installed Tomcat on OSX 10.2 yet? Are there any differences in the install process?



[ Reply to This | # ]
Tomcat and 10.2
Authored by: pr9000 on Nov 12, '02 03:48:11PM

i had it running. the only changes in instructions was the new release of tomcat (4.1.12) in all the directory references ...

but i couldn't log in! every username/password combination i created got the same "you entered invalid user or password" messages. so i gave up. :)



[ Reply to This | # ]