1. For your home system, all you need in your filesystem is an
image of the same tomcat filesystem tree we are using at cs.umb.
This is provided in $cs636/tomcat.zip. Of course you don't
have to use your assigned port numbers at home. Just use the default
port 8080 (as provided in the zip), plus 8005 for shutdown. Note
that we do NOT want to install tomcat as a service. We want
to use it as a user-level program, so it's easy to bring up and
down. I have my tomcat installed at c:\tomcat-8.5, for easier
access from the command line. You can copy or rename the whole
thing to a different location if you decide later you don't like the
2 You don't need to set CATALINA_HOME as an environment variable for tomcat itself, but we will need it for our build.xml, so set it up. I'm assuming you already have JAVA_HOME set up as an environment variable, as described in DevelopmentSetup.html for Windows, Linux, and MacOSX. Use the same procedure for CATALINA_HOME. For example, I have CATALINA_HOME defined as C:\tomcat-8.5 for my Windows PC. Also define TOMCAT_URL as http://localhost:8080.
For Windows, add %CATALINA_HOME%\bin to your Path to allow command-line startup and shutdown.bat of tomcat. (shutdown itself is a system program, so use shutdown.bat) Since the HTTP tool wget.exe is also in this bin, it will now be available to you.
For Linux and MacOSX, add $CATALINA_HOME/bin to your PATH environment
variable. PATH=$PATH:$CATALINA_HOME/bin; export PATH
3. Optional, for Windows. If you prefer icons to commands for starting up and stopping tomcat outside eclipse, make two shortcuts as follows: This assumes tomcat is installed at c:\tomcat-8.5. You can change it as necessary.
Shortcut "start tomcat":
Start in: c:\tomcat-8.5
For a nice icon, browse to your top-level tomcat directory and find tomcat.ico
Shortcut: "stop tomcat": same Shortcut Properties as "start tomcat" except replace start with stop in the Target:
4. In a new shell/CMD window, check your environment variables with set (Windows) or env (Linux/MacOSX)
5. Quick test of tomcat: watch the startup output. You may see a pop up from the Windows firewall, but this should not prevent tomcat from working when accessed from the same machine (this is all we need), so don't be stopped by it. Start up a browser and try URL http://localhost:8080 Hopefully you'll see the familiar tomcat home page. If nothing is there, you can see what ports are in use, including listening ports, by "netstat -a". If you installed JEE in a privileged account (System Admin privileges) you may have Sun's app server running on 8080 as a service. Shut it off as a service.
Eclipse and tomcat: Simplified and enhanced from eclipse (Mars version) docs
Help>Contents>Web Tools Platform User Guide>Developing Web service applications>
Web Services overview> Workspace and tools> Configuring your workspace>
Creating an Apache Tomcat server and Web Project (see if you can find it!)
Once you have installed the tomcat server outside eclipse, create a Tomcat server in the eclipse workbench by doing the following:
To build a dynamic Web project (what we need for pa3 and any other project using servlets or JSP) that points to the Tomcat server that you have created: