I am using UBUNTU and I want to install tomcat to run servlet programs.
Before starting you need the Java Development Kit (JDK) and not Java Runtime Environment (JRE). Download it from http://java.sun.com as a .bin file and install it on your system or use the command:
sudo apt-get install sun-java5-jdk
Then set the Java Runtime variable
$ export JAVA_HOME=?Your java path? $ export PATH=$PATH:$JAVA_HOME /bin
e.g. on Dapper
$ export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06
Now use the following command to install Tomcat
$ sudo aptitude install tomcat5 tomcat5-admin tomcat5-webapps
To Start, Stop and Restart the server
$ sudo /etc/init.d/tomcat5 start $ sudo /etc/init.d/tomcat5 stop $ sudo /etc/init.d/tomcat5 restart
You can access the root directory via port 8180 and the server listens to the address 127.0.0.1 So type 127.0.0.1:8180 in your web browser to access the server.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.