Here's a method for managing Tomcat for PAS-Portal development using Unix shell scripts instead of Eclipse.
This is based on the work that Cynick documented in the How to install the portal for development purposes wiki page - unfortunately it was erased after v2 of that page. I have modified it slightly and re-posted it here.
- Download the attached file: mytomcat.sh and put it somewhere on your path
chmod u+x mytomcat.sh
- Make all the .sh files in CATALINA_HOME/bin executable: chmod u+x *.sh
- Either create
JAVA_HOMEvariables with the proper file paths in a shell startup script (ex:
.bash_profile) or add them to the beginning of the
CATALINA_HOMEis the directory where you unpacked the tomcat distribution.
CATALINA_BASEis the directory where a working copy of tomcat with your specific configurations will reside. A benefit of this set up is that you can have more than 1 working installation, ie. multiple separate projects running separate containers but still using the same tomcat distribution. For more information see Advanced Configuration - Multiple Tomcat 4 Instances section 4.
JAVA_HOMEis the directory where the base Java installation resides for your specific OS. For Mac OS X, see Overview of Java for Mac OS: Finding Your Way Around
- For Windows, see Set JAVA_HOME variable in Window.
- Copy the conf directory from the unpacked tomcat distribution to where you've defined your
- Create the following directories under your
CATALINA_BASE: logs, temp, webapps, work.
Now you can do the following:
Which should respond with something like this *:
*from a MacOS 10.4.11 system
The default Tomcat install should now be running at: http://127.0.0.1:8080
mytomcat.sh script supplies the following functions:
start: start the tomcat server
stop: start the tomcat server in debug mode
restart: stop and then start the tomcat server
killall: terminate the tomcat processes
status: display status information about running tomcat processes