Install Tomcat Ubuntu

Here are a few steps which will let you install Tomcat in Ubuntu.

How To Intall Tomcat In Ubuntu

Simply goto the terminal ( Applications -> Accessories -> Terminal ) and enter:

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

After successfully installing Tomcat from the above command line, open up your browser, and put the default address as:

http://localhost:8080/

If it is successfully installed in your system, then you will be able to see a page saying It Works !

Tomcat Directory

Now you can have your own directory in the following path, like create a new folder as test in the following path:
/var/lib/tomcat6/webapps/

and write a simple JSP application say testing.jsp, in the test folder.

How To Access Tomcat Server In Browser

To access your folder or file in your Tomcat folder, you simply have to right:

http://localhost:8080/test/testing.jsp

If you are unable to see the results above, try restarting your Tomcat Server, by using the following start, stop or restart command.

Start, Stop & Restart Tomcat

Start Tomcat

To start your Tomcat server, use the following command in the Terminal:
sudo /etc/init.d/tomcat6 start

Stop Tomcat

To stop your Tomcat server, use the following command in the Terminal:

sudo /etc/init.d/tomcat6 stop

Restart Tomcat

To restart your Tomcat server use the following command in the Terminal:

sudo /etc/init.d/tomcat6 restart

Uncategorised

Leave a Reply

Your email address will not be published. Required fields are marked *