$ nano ~/.bashrc
and set the environment variabels in it which are
export JAVA_HOME=/usr/lib/jvm/jdk-17
export CATALINA_HOME=/opt/tomcat/apache-tomcat-10.0.12
saved the changes
$ . ~/.bashrc
$ $CATALINA_HOME/bin/startup.sh
then i runned http://127.0.0.1:8080 in browser it worked perfectly fine for me
but when i checked that application for which i installed the tomcat 10.0.12 it said for now its not supported to use tomcat i have to install tomcat 10.0.10 so i unistalled tomcat using below command
sudo rm -rf /opt/tomcat
and installed tomcat 10.0.10 by making few changes in above code but when i runned http://127.0.0.1:8080 again the page shown me this
please ignore 8.5.05 cause i downloaded this image from another website which was providing tutorial to insatll tomcat on linux
i think tomcat didn't uninstall completely and still running what should i do please tell me
Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for off-line use.
I'm sorry Aditya, I thought the above posts were self evident.
As Tomcat is already Uninstalled, follow the installation guide above and adjust bashrc as necessary.