How to install Apache Tomcat server on Ubuntu 11.04

29 07 2011

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  😀

<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


Actions

Information

25 responses

29 07 2011
තාරා

thanx gihan…….

2 08 2011
Amee Brooksher

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.

2 08 2011
Gihan

😀 No problem Amee.

2 08 2011
taylor lautner workout

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

2 08 2011
this here

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

2 08 2011
Gihan

No Jennifer, it’s not a custom build theme. It is Freshy theme for wordpress blogs.😀 http://theme.wordpress.com/themes/freshy/

3 08 2011
vpn download

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! .

4 08 2011
black peep toe pumps

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!

4 08 2011
vnc download

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

6 08 2011
cover letter

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.

7 08 2011
zombieville usa

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

7 08 2011
invest liberty reserve

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

7 08 2011
invest liberty reserve

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

9 08 2011
invest liberty reserve

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

9 08 2011
Patrick Finner

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.

12 08 2011
tv online

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.

13 08 2011
beautiful widgets apk

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

18 08 2011
beautiful widgets apk

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

24 08 2011
shashank

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

29 08 2011
cover letter

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.

31 08 2011
mobile computer repairs

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.

14 11 2011
leoanto

could not start tomcat….shows permission denied

15 11 2011
Gihan

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

17 11 2011
leoanto

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.”..

17 11 2011
Gihan

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: