Java Serverside Environment Set up (Windows 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.

Set up Tomcat

From now, let’s set up Tomcat.

At first, run your eclipse that you have already set up.

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

tomcat1-en

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

tomcat2-en

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

tomcat3-en

You can open a screen to choose a server.

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

tomcat4-en

When you click ‘Download and Install…’, a license authentification screen will open. 

tomcat5-en

On the screen, select ‘I accept…’ and click ‘Finish’ button.

tomcat6-en

Then, you need to choose a directory for install on directory reference screen.
This time, create a new folder ‘tomcat/8’ in ‘eclipse’ folder.

After selecting ‘8’ folder and clicking ‘OK’ button, installation will start.

tomcat7-en

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

This following image is selecting ‘jre1.8.0_144’.

After installation complete, click ‘Finish’ button.

tomcat8-en

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

tomcat9-en

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’=>’8’=>’lib’ in ‘eclipse’ folder and save the downloaded file ‘mysql-connector-java-5.1.10-bin.jar’.

mysql-connector

You have completed JDBC driver setting.
Tomcat set up is complete.