Installing Tomcat on Mac OS X
Pages: 1, 2
The installer will ask you where you wish to install Tomcat. Just type in /Library/Tomcat/jwsdp-1_0-ea2 and click on the next button. The installation will begin. This takes a while, so go get a cuppa tea, and while waiting for the installer to run, do the following:
In /Library/StartupItems make a folder called Tomcat.
|
|
In that folder you will create two files, the first, an executable shell script called Tomcat, and the second a property list called StartupParameters.plist. Both are simple text files.
Tomcat shell script:
#!/bin/sh ## # Start Tomcat ## . /etc/rc.common ConsoleMessage "Starting the Java WebServices framework" export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export CATALINA_HOME="/Library/Tomcat/Home" export TOMCAT_HOME="/Library/Tomcat/Home" export JWSDP_HOME="/Library/Tomcat/Home" sh ${TOMCAT_HOME}/bin/startup.shStartupParameters.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>Description</key> <string>Tomcat Servlet and JSP Server</string> <key>Messages</key> <dict> <key>start</key> <string>Starting Tomcat Server</string> <key>stop</key> <string>Stopping Tomcat Server</string> </dict> <key>OrderPreference</key> <string>None</string> <key>Provides</key> <array> <string>Tomcat</string> </array> <key>Requires</key> <array> <string>Resolver</string> </array> </dict> </plist>
You can either use a text editor to create the .plist file, or Apple's PropertyList editor.
Make sure the Tomcat script you just added is executable.
chmod 755 Tomcat
|
|
When the Tomcat installer is complete you should see the jwsdp-1_0-ea2 folder in your /Library/Tomcat folder.
Make a soft link to that folder from an alias called Home.
ln -s jwsdp-1_0-ea2 Home
Your TOMCAT_HOME is now always going to be /Library/Tomcat/Home.
If you wish to install other versions of Tomcat, put them in /Library/Tomcat and remake the soft link to Home. This way you don't need to change any other settings.
So give it a go.
cd /Library/StartupItems/Tomcat and type:
./Tomcat to run the Tomcat script.
You should see the following as Tomcat's startup script launches.
Using CATALINA_BASE: /Library/Tomcat/Home
Using CATALINA_HOME: /Library/Tomcat/Home
Using CATALINA_TMPDIR: /Library/Tomcat/Home
Using JAVA_HOME: /System/Library/Frameworks/JavaVM/Versions/1.3.1/Home
Now try to go to http://localhost:8080 using your Web browser.
You should see the Web Services Developer Pack EA2 screen. That's it. You have installed the Web Services Developer Pack. As a final test, restart your Mac. If everything worked properly, you should see "Starting Tomcat Server" appear in your startup window. Let the Mac sit there without logging in.
Now, using a browser on your other Mac (You do have another Mac don't you?) you should be able to go to http://10.0.1.xx:8080 and get the Web services page to open.
Congratulations, you now have a Tomcat installed that boots at startup and runs without requiring a user to log in.
Have a play with the examples and then, when you're feeling up to it, you can start writing your own Web services, servlets, and JSP pages.
Dave Sag is a skilled Object Modeler and Software Designer, using Java as well as other programming environments.
Return to the Mac DevCenter.
-
Newer Tutorial
2009-04-26 07:42:55 boolissa [View]
-
Tomcat on OS X 10.5
2009-02-12 11:28:20 clatko [View]
-
tomcat on Leopard
2007-11-05 09:44:43 josephtate [View]
-
tomcat on Leopard
2008-05-24 13:11:00 rxt360 [View]
-
Error
2006-01-13 21:05:34 dennischow [View]
-
Thanks
2005-11-14 02:42:11 mnystedt [View]
-
Startup problem
2005-07-11 05:42:02 ColinUK [View]
-
New version of Java Web Services Dev Pack
2004-09-09 20:14:18 reallygreen [View]
-
Run tomcat startup appear in startup Window?
2004-05-25 10:47:10 huidio [View]
-
Opening Up for All to Run
2004-02-21 11:14:47 woodgnome [View]
-
Opening Up for All to Run
2005-03-21 21:13:37 MDW [View]
-
Nice easy install
2004-01-29 19:23:29 javaravyn [View]
-
No such directory "/Library/Tomcat/Home/"
2004-01-01 14:30:28 anonymous2 [View]
-
No such directory "/Library/Tomcat/Home/"
2005-08-08 13:21:41 illovich [View]
-
No such directory "/Library/Tomcat/Home/"
2004-07-09 14:17:09 feltoon [View]
-
No such directory "/Library/Tomcat/Home/"
2008-02-19 11:48:54 djincheg [View]
-
Great guide
2003-11-11 11:41:13 anonymous2 [View]
-
10.3
2003-11-02 13:01:04 anonymous2 [View]
-
Upgraded to Java 1.4.1 now tomcat doesn't work
2003-10-16 14:32:08 anonymous2 [View]
-
Upgraded to Java 1.4.1 now tomcat doesn't work
2005-08-08 13:36:26 illovich [View]
-
Works with localhost but not with IP address
2003-09-25 22:18:53 anonymous2 [View]
-
Works with localhost but not with IP address
2003-11-02 12:54:59 anonymous2 [View]
-
Great help
2003-07-14 19:48:29 anonymous2 [View]
-
Tomcat installer
2003-06-14 02:18:17 anonymous2 [View]
-
Problem with running ./Tomcat
2003-05-06 13:32:54 anonymous2 [View]
-
Problems on 10.2.4 with JDK 1.4.1
2003-04-18 18:01:55 anonymous2 [View]
-
Problems on 10.2.4 with JDK 1.4.1
2003-04-19 00:12:15 anonymous2 [View]
-
OSX 10.2 install
2003-03-27 21:30:34 anonymous2 [View]
-
OSX 10.2 install
2003-05-01 12:58:57 anonymous2 [View]
-
Bash or tcsh
2003-03-13 20:21:06 anonymous2 [View]
-
localhost vs 127.0.0.1
2003-02-17 10:23:50 anonymous2 [View]
-
Installation failed.
2003-02-17 09:59:37 anonymous2 [View]
-
Command Not Found running TOMCAT script
2003-01-12 18:52:04 anonymous2 [View]
-
Forgot: Command Not Found running TOMCAT script
2003-01-31 01:40:03 orangehead911 [View]
-
Command Not Found running TOMCAT script
2003-01-31 01:13:50 orangehead911 [View]
-
Strange Error
2003-01-08 20:36:23 anonymous2 [View]
-
Cocoon - Help?
2002-12-21 05:01:58 anonymous2 [View]
-
startup/shutdown not working independently
2002-11-24 13:45:58 anonymous2 [View]
-
It did not work for me!! Any help
2002-11-19 03:46:43 anonymous2 [View]
-
command not found
2002-11-12 11:23:16 anonymous2 [View]
-
command not found
2002-11-15 08:49:27 toby_j [View]
-
command not found
2002-11-28 08:04:58 jrmjr [View]
-
Flubbed install...
2002-10-31 03:31:37 anonymous2 [View]
-
Does this work in OS X 10.2
2002-09-10 10:55:42 anonymous2 [View]
-
Does this work in OS X 10.2
2002-09-12 08:08:44 oliverspapa [View]
-
Does this work in OS X 10.2
2002-09-12 19:55:55 kehret [View]
-
Tomcat and Apache
2002-08-12 23:09:45 yoichi [View]
-
Instal Tomcat in IDE
2002-08-12 22:35:47 yoichi [View]
-
now with feeling....
2002-08-06 10:37:25 markroyko [View]
-
tomcat and apache
2002-07-17 15:12:50 pclancy [View]
-
great article - any info on mod_jk?
2002-06-29 21:31:15 billin [View]
-
Security of system files - chmod 777?
2002-06-19 09:11:26 vkevlar [View]



