Installing and configuring tomcat on Mac OS X

13 01 2008

Follow the excellent instructions on the apple developer connection site:

Java and Tomcat on Mac OS X, Part I
Java and Tomcat on Mac OS X, Part II
(Alternately search for tomcat on the developer connection site).

I’ve decided to go with tomcat-5.5.25 available for download here.

NOTE: you can follow the entire instructions and build the example apps if you like however I recommend just reading to the part were you test the example servlets and jsp pages. Once we have an application server up and running we can focus on building a web application using Maven.

NOTE: The articles above don’t include instructions on configuring the correct user access to run the manager and admin applications. Like me, you might have thought the default passwords for the tomcat manager application may be configured but they are not (probably for security reasons?) well here’s how (note that currently the manager app is included in the tomcat download but the administrator app IS NOT and must be downloaded separately):

Edit the tomcat-users.xml file at $CATALINA_HOME/conf/tomcat-users.xml and add the admin and manager roles, then add your user to those roles:

<tomcat-users>
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>

<user username="tomcat" password="tomcat" roles="tomcat,admin,manager"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
</tomcat-users>

Once you restart tomcat you will have access to the manager application (and the administration app if installed).


Actions

Information

Leave a comment