Tomcat 4 on osx

jbm

Registered
I've been trying to get tomcat 4 running on my mac

following this...

http://www.worker-bee.com/misc_dev/install_tomcat.html

when i try to start it up i get this...

[localhost:/tomcat/bin] jbm% ./startup.sh
Guessing CATALINA_HOME from catalina.sh to ./..
Setting CATALINA_HOME to ./..
You must set JAVA_HOME to point at your Java Development Kit installation


HELP!!
 

dani++

usin UNIX since '92
You must set the environment variable JAVA_HOME to the location of the java runtime and stuff. I was able to easily install and run TOMCAT 4 on MacOSX.

I think it must point to /usr or something like that.

Read the instructions more carefully (RTFM)


dani++
 

jbm

Registered
I guess a lot of things has changed in v4... i used this in the .tcshrc file...

setenv JAVA_HOME /usr
setenv CATALINA_HOME /Applications/Tomcat

(This is where I've but the stuff)

Now i can go to the browser and see the index file at http://localhost:8080/

But i can't run the examples... i get this error

Apache Tomcat/4.0.1 - HTTP Status 404 - /examples/jsp/
------------------------------------------------------------------------

type Status report

message /examples/jsp/

description The requested resource (/examples/jsp/) is not available.



the samme occurs with the servlets, i haven't moved any files or anything.

I've tried to log in as root and set the read/write permission to anyone.

Any ideas anyone? I'll pay with a bunch of smileys and a toast in old whiskey.
 

hugheba

Registered
Dani

Where did you point your JAVA_HOME to?

On 10.1.1 I'm pointing my JDK JAVA_HOME to
/system/library/frameworks/javavm.framework/versions/currentjdk/home/

I can run and get the index page at localhost:8080/ but when I click on the link for jsp examples or servlet examples i get the error

Apache Tomcat/4.0.1 - HTTP Status 404 - /examples/servlets/
------------------------------------------------------------------------

type Status report

message /examples/servlets/

description The requested resource (/examples/servlets/) is not available.

is there anything special you did?

CATALINA_HOME is = to
/library/catalina/

Any help would be greatly apprecaited.
 

mntamago

Registered
I used Apple's advice to get Tomcat up and running:

####### quote #####
Now you can create a file called ~/bin/start_tomcat with the following contents:

#!/bin/sh
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
export JAVA_HOME=/usr
$CATALINA_HOME/bin/startup.sh

And a file called ~/bin/stop_tomcat with these contents:

#!/bin/sh
export CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.1
export JAVA_HOME=/usr
$CATALINA_HOME/bin/shutdown.sh

Finally, you must make these files executable:

liz@localhost:bin> chmod ug+x start_tomcat stop_tomcat
#####################

The above was taking from the follow page...
http://developer.apple.com/internet/macosx/tomcat1.html

I have found that although I was able to get Tomcat running with no
problems, the instructions that Apple lists for getting Tomcat to work
with Apache do not seem to work on my system. Perhaps this is
because I compiled over the Apple version of Apache with
apache-1.3.22. When I try to restart apache I get the following error:

dyld: httpd Undefined symbols:
_ap_ctx_get
 

Python

Registered
I got it!

I tried installing from the directions on Apple's page and got the same error noted above (could see the tomcat page but got and error when trying to run the examples).

I found the directions were fine except for one thing...

*** use gnutar instead of tar (or stuffit) when unpacking the .tar file. ***

I trashed my previous install and used gnutar -xvf <file.tar> and then followed the rest of the directions as they were and it worked.

Btw, the reason it wasn't working is in one of the log files generated during startup. It was throwing a class not found exception (probobly due to the unpacking with Stuffit which IE did for me). But since it didn't finish setting up the examples dir during startup it looked like it was a permission problem because the examples directory was clearly there.

-----------------
2001-12-13 22:49:45 StandardContext[/examples]: Exception starting filter Set Character Encoding

java.lang.ClassNotFoundException: filters.SetCharacterEncodingFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1
307)
------------------

I also noted on Apache's tomcat page they say not to use the tar command in OSX and to use a gnu compatible one (I guess they are right, lol)

I hope this works for everyone like it did for me.
 
Top