Install Tomcat on Mac

Chad Darby
A free video tutorial from Chad Darby
Popular Java Spring Instructor - Best Seller
4.6 instructor rating • 8 courses • 391,201 students

Learn more from the full course

JSP, Servlets and JDBC for Beginners: Build a Database App

JSP: Covers latest versions of JSP 2.3 and Servlets 3.1 - Most Popular JSP/Servlet course

08:39:49 of on-demand video • Updated May 2020

  • Build a fully functioning JSP and Servlets web application from scratch
  • Set up your JSP/Servlet development environment with Tomcat and Eclipse
  • Explore JSP scripting elements: Expressions, Scriptlets and Declarations
  • Read HTML form data with JSP and Servlets
  • Manage application state with Sessions to track unique user actions
  • Leverage Cookies to personalize a web site for a specific user
  • Integrate the JSP Standard Tag Library (JSTL) to minimize scriptlet code
  • Build a Multi-Lingual app using Internationalization and JSTL
  • Build an MVC application with JSP and Servlets
  • Generate HTML Tables with JSP and Servlets
  • Add database support with JDBC: query, insert, update and delete
  • Build a complete database web app with JDBC
English Instructor: Hey, welcome back. So, let's go ahead and get our hands dirty with setting up our development environment. In this video I'm gonna show you how to install Tomcat on the Mac operating system. All right, so what we need to do is to open up a web browser and visit the Tomcat website, so I need to go to So, this will bring me to the main Apache Tomcat website. This is where we can actually download the software, so over on the left-hand side there's a Download section and it has the different versions of Tomcat that we can download. At the time of this video recording the current version is Tomcat 8, however, there may have a new version and you can simply download the appropriate version, so I'll go ahead and select Tomcat 8 for this video and this will show me the Tomcat 8 downloads. I'll just scroll down a bit and I'll move down to the binary distributions, that means this is the binary code or whatever. Since I'm doing this for a Mac I'll go ahead and choose tar.gz, so it's simply a zip file that preserves the file permissions and I'll select the link here. My browser's going to prompt me for the actual file and I'll say save the file and I'll hit OK and so, this will actually download the Tomcat file to my local computer. All right, great, so we've actually downloaded the file to our file system, so let me go over and open up my finder. Let me move into the Downloads directory and this is where I'll find the actual file that was just downloaded, so here apache-tomcat-8. Now what I need to do is actually unzip the file, so I can actually unzip it by double clicking it, so I'll go ahead and do that now and now I have this folder here for apache-tomcat-8, so this is the unzipped version of the file. All right, so what I normally like to do is actually move this into another directory so I can make use of it, so we'll actually make use of a directory for this training class and I'll call it jsf-for-beginners, so let me go and open up a new window here. I'll move down to the bottom and I'll say New Folder and I'll call it jsf-for-beginners, so this is really just like a little empty scratch temp folder that we're gonna use for this training class. I'll put all of our apps in here, all of our servers and so forth, so just one central location. Jsf-for-beginners. So, it's empty now, I'll just double click moving to it and what I'd like to do is that folder that I just expanded up top, tomcat-8, I'll just grab it, drag and drop it into this new folder, jsf-for-beginners, so all I do is just copy that expanded directory to this new folder jsf-for-beginners. Okay, so this looks pretty good. All right, so now that I have a file extracted, I actually want to verify the Tomcat installation by actually running the server, so what I'll do is I'll open up a terminal window here and what I'd like to do is actually move into that Tomcat installation directory. So, I'll just do a CD, I'll move into that jsf-for-beginners that we just created and then the apache-tomcat directory that we just copied over. All right, great, so I'm in the directory, now I'll just do an ls just to see the contents of this directory and we'll see that this directory has a, this is in the bin directory,, this is what I'll use to actually start the Tomcat server, so on my command line here I'll type in bin/ and this will actually start the Tomcat server for me, so we can see some logs and then we'll see in the bottom left Tomcat started, so this is really good, so our server's installed and we also started the server, so at this point Tomcat is up and running and it's listening for a request. All right, great, so now that our server's running, we can actually access our server, so in my browser I can simply type local host:8080 and this will connect to my Tomcat server. By default Tomcat is listening on port 8080 and that's how we connect to it, so here we make it to a page Tomcat with the version number and then they'll even tell you hey, if you're seeing this page, you've successfully installed Tomcat, so we're in really good shape here, so we downloaded the server, we installed it and we also started the server and then we accessed it via our web browser, so we know that things are looking really good for us, so good job so far. And one final thing we wanna do is actually stop the server or shut down the server because later on we're gonna us it via Eclipse, so in our bin directory we can say just bin/ and that will actually stop the Tomcat server but don't worry, once we install Eclipse, then we'll actually Tomcat from the Eclipse server. All right, so we did a lot of good things in this video. So, I showed you how to install the Tomcat server on a Mac operating system. We went through the process to actually start the server and also accessed the server and then finally, how to stop the server, so we're in good books now that we have successfully installed Tomcat.