Running Tomcat Server On Ubuntu

Running Tomcat Server On Ubuntu

Running Tomcat Server On Ubuntu 20.04

Tools needed:- 1. Eclipse IDE 2. Tomcat installed 3. Patience! :P

ECLIPSE

A Java Development IDE (Integrated Development Environment) software. It comes pre-loaded with a base workspace and an extensible plug-in system and system support. It is basically written mostly in JAVA, with some part of it written in C.

TOMCAT

An open-source implementation of Java Servelet, JSP, Java Expression Language and WebSocket technologies. It provides a “pure Java” HTTP web server environment in which java code can run.

Downloads: ECLIPSE: https://www.eclipse.org/downloads/ TOMCAT: https://tomcat.apache.org/download-90.cgi (Note: This article is for eclipse 2020 edition, which still faces issues for tomcat 9+ versions, I’d recommend to go for v8.5)

The respective version can be found using the above link.

PROCESS:

  1. Download the .tar or .zip file from the given link.

  2. Extract it to a specified folder, better to go for /usr/local/ path, for security purposes.

  3. Open Eclipse, in the MENU bar, a. Goto Window -> Show View -> Servers. b. Select apache tomcat from the list and proceed with the default entries. c. Locate the file using browse, and you’d think you’re done. NO! You’re not. No issues, I’m happy to help!

  4. You need to give priveleges to the user and hence, eclipse to run the tomcat executable. Go to the extracted folder, and run the following command:- sudo chmod a+r /conf/* After specifying the tomcat directory.

  5. Get back to eclipse, follow the above process if you’ve cancelled it, specify the tomcat path and done. You’ll see the tomcat version at the top of the server dialog box.

  6. Click on FINISH.

(Note: While writing this answer, I used eclipse 2020 edition, and tomcat 8.5. Tomcat 9 isn’t compatible)

OPTIONAL: 1. You can download plugins from eclipse marketplace for easier access to tomcat. 2. Another alternative is JST Server Adapter plugin, you can use that too.

FINISHED INSTALLATION:- When you’ll click on run, select RUN on server.