How to install Apache Tomcat server on Ubuntu 11.04

Hi, Today I'm going to tell you how to install Apache tomcat server on your Ubuntu (Linux) computer. You can install and use it as a portable installation on your pen drive too.Apache tomcat server is used to run .jsp file (Java Server Pages). So first you need to download Apache Tomcat 7.0 from Apache site.

DOWNLOAD Apache tomcat here!..

Ok let's do it. Now extract the downloaded apache-tomcat-7.0.19.tar.gz file into desktop or to your pen drive.

Then rename it as tomcat (only for our convenience)

Open Terminal window (Ctrl+Alt+T)

Then go to this folder using this command : cd Desktop/tomcat/bin ( assuming you extracted on your Desktop )

Then run this command(run startup.sh shell script) : ./startup.sh

Now open firefox go to this URL : http://localhost:8080/ . Then you should see it like this!



Now try a jsp script to test the installation.


If you want to, copy this code and save it into tomcat-->webapps-->ROOT as hello.jsp  Then run it http://localhost:8080/hello.jsp  :D

<html>
<head>
<title>JSP Test page.</title>
</head>
<body>
<p align="center"><font color="#009900" size="7"><%="gihansblog.com"%></font></p>
<p align="center"><font color="#FF0000" size="6"><%="Hello JSP World!"%> </font></p>
<p><%= new java.util.Date()%></p>
</body>
</html>

To shut-down the Tomcat server use this command(run shutdown.sh shell script) : ./shutdown.sh


Thanks

Gihan

Comments

  1. Wonderful document along with very easy for you to figure out justification. Exactly how can My spouse and i attempt receiving concur for you to submit element in the document inside my future news letter? Getting suitable credit history to you personally your publisher along with web page link on the blog won't certainly be a trouble.

    ReplyDelete
  2. heya, one quick question for you, is the theme your using custom built? The reason I ask I'm looking for something similar but I cant find one, can you please tell me where you got it from? many thanks, Jennifer

    ReplyDelete
  3. hi, quick question, is your theme custom built? I'm just wondering because I'm looking for something similar but im struggling, can you please tell me where you got it from? Thanks a lot, Jennifer

    ReplyDelete
  4. No Jennifer, it's not a custom build theme. It is Freshy theme for wordpress blogs. :D http://theme.wordpress.com/themes/freshy/

    ReplyDelete
  5. I like Your Article about How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.. Perfect just what I was looking for! .

    ReplyDelete
  6. Thanks for informative post. I am pleased sure this post has helped me save many hours of browsing other similar posts just to find what I was looking for. Just I want to say: Thank you!

    ReplyDelete
  7. Thanks i love your article about How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog..

    ReplyDelete
  8. Your Article about How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.. Real wonderful visual appeal on this web site , I'd rate it 10 10.

    ReplyDelete
  9. I agree with your How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.., good post.

    ReplyDelete
  10. I agree with your How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.., excellent post.

    ReplyDelete
  11. I agree with your How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.., good post.

    ReplyDelete
  12. Thanks i love your article about How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog..

    ReplyDelete
  13. Excellent piece of writing and easy to realize story. How do I go about getting agreement to post element of the content in my upcoming newsletter? Offering proper credit to you the source and weblink to the site will not be a problem.

    ReplyDelete
  14. I don't know what to say to be good. Everyone can to have an oppinion, i say just our oppinion is not the same.

    ReplyDelete
  15. I agree with your How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.., superb post.

    ReplyDelete
  16. I agree with your How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.., wonderful post.

    ReplyDelete
  17. thanx a lot for this simple article on tomcat, please keep publishing such articles, they are great.

    ReplyDelete
  18. Your Article about How to install Apache Tomcat server on Ubuntu 11.04 Gihan's Blog.. Real wonderful visual appeal on this internet site , I'd rate it 10 10.

    ReplyDelete
  19. Studying from earlier problems might be one of the better guidelines for bloggers who normally omit writing a blog if achievement just isn't featuring up promptly. On the other hand search engines like google prizes endurance and just by possessing persistence and by incorporating far more associated subject material to a website, you can currently pass many webmasters within your area of interest who do not have persistence.

    ReplyDelete
  20. could not start tomcat....shows permission denied

    ReplyDelete
  21. Ok pls try this command chmod 755 startup.sh before ./startup.sh I think it should fix your problem! :D

    ReplyDelete
  22. i tried the command...but it is showing..this error...
    "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program."..

    ReplyDelete
  23. That means first you need to set your JAVA_HOME variables. So try this on terminal window

    sudo /etc/bash.bashrc

    JAVA_HOME=/usr/lib/jvm/java (I assume this should be your java directory)
    export JAVA_HOME
    PATH=$PATH:$JAVA_HOME/bin
    export PATH


    source /etc/bash.bashrc
    source ~/.bashrc

    echo $JAVA_HOME (this will show you the path you set up)
    echo $PATH

    ReplyDelete

Post a Comment

Popular posts from this blog

Joomla 1.7 installation with XAMPP problem solved

Switching to a third party Domain Name System (DNS)?

A shell script for Renaming large number of files in Linux