Tomcat setup with Eclipse Mars - 2020
In this article we'll see how to setup Tomcat with eclipse Mars.
We'll try to deploy applications from within eclipse including Servlet 3.x projects under the following environments:
- eclipse Mars.2 Release (4.5.2)
- Tomcat 8.0.32
- Oracle JAVA 8 (JDK 8u72)
In Eclipse, Open Window -> Show View -> Others...
Select Servers and Click OK.
At this point, we don't have any servers. So, to create a new server, we need to click the link under the Servers tab:
Set the installation directory the same as the unzipped folder:
Click Next -> Finish.
We need to update the location of our server. So, right click on Servers -> properties -> Switch Location -> Apply -> OK.
If we double click on the Server, we can see the following configuration has been setup:
We need to change the configuration:
- For Server Path, refer to our local tomcat directory.
- For Deploy path refer to webapps folder inside that tomcat directory.
After changing the configuration, SAVE it.
We can start the server by clicking the green arrow which is under the Server tab:
We can see our Tomcat server is now running within eclipse:
Note: we may want to move install directory so we can avoid any permission issue. In my case, I installed it /var/lib/tomcat8, and give tomcat user the permission. But with ellipse, it's not supposed to work. So, I ended up with give general permission (k which is my username).
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization