Today I installed Tomcat on my MacBook. In order to run a website with Java servlets locally.
Here are my non-developer notes, for my own future reference.
To check if Java is installed, open Terminal and type:
javac -version
In a previous session, I had already installed the Apple developer tools, which includes JDK 1.5.
Note: you’ll need to list the location where Java can be found:
export JAVA_HOME=/usr
Download and unpack the Tomcat zip files to a directory.
Open conf/tomcat-users.xml
and change the user and password settings.
Go to your Tomcat directory and type ./bin/startup.sh
Open a browser and type http://localhost:8080
to see a Tomcat welcome screen.
In the final step, I modified conf/server.xml
. Luckily I had my Windows setup to refer back to, or I would have been really lost at this stage…
Leave a Reply