Tomcat installation and configuration for Eclipse dynamic web project

617 views Asked by At

I have installed Tomcat 9 by using standard way in my Ubuntu 20:

sudo apt install tomcat9 tomcat9-admin

But this installation not defines CATALINA_HOME value.

echo $CATALINA_HOME brings nothing. Why? What is right location for CATALINA_HOME?

Conent of /var/lib/tomcat9 : conf lib logs policy webapps work

Conent of /etc/tomcat9 : conf lib logs policy webapps work

My Eclipse JEE Tomcat server runtime environment configuration complains with message

Unknown version of Tomcat was specified.

How to fix that problem?

enter image description here

2

There are 2 answers

0
nitind On

Don't use an installed copy. The locations of files needed to properly launch Tomcat from Eclipse and actually control the process could have been relocated to who knows where. Download the tar/zip file from tomcat.eclipse.org, and use that instead.

https://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_won.27t_the_New_Server_Runtime_dialog_recognize_my_Linux_installed_version_of_Tomcat.3F

0
Vy Do On

When you install by command

sudo apt install tomcat9 tomcat9-admin

Tomcat become a services inside operating system. Don't use this way in development.

Download Apache Tomcat, unzip, then point to its directory / declare path of Tomcat in Eclipse IDE. Tip: Must check permission some files, allow it read, write inside Tomcat.