Java Serverside Environment Set up (Mac ver.)Set up Tomcat

After you completed Java and Database environment set up, you need to set a Web application server (AP server) to run Java server side programs.

This time, we will use an AP server, Tomcat.

Tomcat is an open source product that provides functions without any charge and very popular as a Web application server which has ‘Servlet/JSP container’.
Tomcat’s full name is Apache Tomcat.

Installation of Tomcat

From now, let’s install Tomcat.

At first, download Tomcat from the following site.

Apache Tomcat(http://tomcat.apache.org/)

On this website, select ‘Tomcat8’ from ‘Download’.


Click ‘8.0.46’ link on the following screen.


Because you are using Mac, choose ‘tar.gz’.


After you completed downloading, unzip the downloaded file.

Create a ‘Tomcat’ folder under ‘Applications’ and put the unzip ‘apache-tomcat-8.0.46’ folder.

Set up Tomcat

Next, you need to set up Eclipse.

Run your eclipse that you have already set up.

Select ‘Window’ in menu => ‘Open perspective’ => ‘Other’.


After opening the following screen, select ‘JavaEE’ and click ‘OK’ button.


Next, select ‘Server’ tab at the bottom of Eclipse screen and click a link of ‘No servers are..’.

You can open a screen to choose a server.

Select ‘Apache Tomcat v8.0’ in ‘Apache’ folder and click ‘Next’ button.


On the screen to set up Tomcat, click ‘Browse’ button.


You have to choose the downloaded folder of Tomcat on the window.

This time, because you will use the downloaded Tomcat whose version is 8, choose ‘apache-tomecat-8.0.46’ of ‘Applications>Tomcat’ folder and click ‘OK’ button.


After that, you need to select the latest version of JDK at ‘JRE’.

This following image is selecting ‘Java SE 8 [1.8.0_144]’.

The selection  is over, press the ‘Finish’ button.


You can see that ‘Tomcat v.8.0 Server’ has been added in ‘Servers’.

You have completed all settings of Eclipse for Java server side development.
Close you Eclipse.

Set up JDBC driver for MySQL

After Server setting, you need to set a JDBC driver to connect to database in your Web application.

Download the following link by clicking to download a necessary jar file.

Download mysql-connector-java-5.1.10-bin.jar

Select ‘tomcat’=>’apache-tomcat-8.0.46’=>’lib’ in ‘Applications’ folder and save the downloaded file ‘mysql-connector-java-5.1.10-bin.jar’.

You have completed JDBC driver setting.

Tomcat set up is complete.