Installing Java and Tomcat 5.5 on Ubuntu Jaunty

If you want to try JSP with Tomcat then follow the steps:

1. Go to Applications -> Accessories – > Terminal

sudo apt-get install sun-java5-sdk tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

2. After successfully installing all of the above packages, apt will prompt you for an error message. This is because of the java 5 documentation. Just follow the link that will be prompted by apt and download the files to /tmp. Then execute

apt-get install

3. Your web root will be at /usr/share/tomcat5.5-webapps/ROOT. This is where you will put your web applications or pages.

4. By default, tomcat runs on port 8180. If you want to change it to 8080 or just 80, edit the server.xml

pico /etc/tomcat5.5/server.xml

5. Search for this

<Connector port=”8180″ maxHttpHeaderSize=”8192″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”false” redirectPort=”8443″ acceptCount=”100″
connectionTimeout=”20000″ disableUploadTimeout=”true” />

and change 8180 to 8080 or if you want just 80.

6. Restart your tomcat

sudo /etc/init.d/tomcat5.5 restart

7. Open a browser and type,


if you choose 8080 on server.xml, and


if you choose 80 on server.xml



Leave a Reply

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

You are commenting using your 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