Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have extracted the zip package in my home folder and I want to access webapps folder through localhost:8080, which files I have to change in order to get this done?

I have installed java-6-sun, paths JAVA_HOME and CLASSPATH are set.

Edit: I work on Ubuntu 12.04.

share|improve this question
    
Which Ubuntu release do you have? –  Mitch Jul 14 '12 at 21:55
    
I have Ubuntu 12.04 –  lunar Jul 14 '12 at 21:56
add comment

2 Answers 2

up vote 0 down vote accepted

IMHO Mitch's answer looks like it has a little error in it, assuming that Lunar did not unzip to /usr/share/tomcat6. If you are installing from the zip, then you should not be using /usr/share/tomcat6/bin/startup.sh instead you should be using $TOMCAT_HOME/bin/startup.sh where $TOMCAT_HOME is the directory that you unzipped into. If you continue to have problems, please enter $TOMCAT_HOME and issue the following commands, and show me the output

pwd
sh bin/startup.sh
cat logs/catalina.out

Then, please attempt to load http://localhost:8080 and tell me the result seen in the browser.

share|improve this answer
    
Hi Oyrm, I am aware of this paths thing. The output of pwd: /home/lunar/tomcat, the output of second command is: Using CATALINA_BASE: /home/lunar/tomcat Using CATALINA_HOME: /home/lunar/tomcat Using CATALINA_TMPDIR: /home/lunar/tomcat/temp Using JRE_HOME: .:/usr/lib/jvm/java-6-sun Using CLASSPATH: /home/lunar/tomcat/bin/bootstrap.jar , –  lunar Jul 14 '12 at 23:37
    
the output of the 3rd is too big. But shutdown.sh returns this: Using CATALINA_BASE: /home/lunar/tomcat Using CATALINA_HOME: /home/lunar/tomcat Using CATALINA_TMPDIR: /home/lunar/tomcat/temp Using JRE_HOME: .:/usr/lib/jvm/java-6-sun Using CLASSPATH: /home/lunar/tomcat/bin/bootstrap.jar ./catalina.sh: 425: ./catalina.sh: .:/usr/lib/jvm/java-6-sun/bin/java: not found –  lunar Jul 14 '12 at 23:37
    
Startup.sh looks good, Immediately after you run startup.sh please do try to load localhost:8080 and tell me exactly what you see. Also, please find a way to share that log. I recommend using pastebin.com –  OYRM Jul 14 '12 at 23:50
    
localhost:8080 - Firefox can't establish a connection to the server at localhost:8080. Oyrm what log details would you like to see? –  lunar Jul 14 '12 at 23:51
    
The phrase "can't establish a connection" means you can't attach as a client to port 8080. Either the startup is failing, thus not binding to 8080, or the startup is succeeding and binding to 8080, but you have a firewall blocking 8080 and preventing clients from attaching. Any error messages in the log. I don't know what's wrong, so I'd prefer to see the full log if at all possible. If not, then please do read the log and tell me if you see any errors. –  OYRM Jul 14 '12 at 23:57
show 11 more comments

We just installed Tomcat7 at work, and it rund great.

To install Tomcat 6, just unzip it with tar -zxvf apache-tomcat-6.0.35.tar.gz. Then just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, switch to the directory were you unzipped, and run the command below.

sudo /usr/share/tomcat6/bin/startup.sh

sudo /usr/share/tomcat6/bin/shutdown.sh

To start as a service

sudo /etc/init.d/tomcat6 start

In case you want another way of installing tomcat, tust press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo apt-cache search tomcat
sudo apt-get install tomcat6
sudo apt-get install tomcat6-admin
share|improve this answer
    
Exactly thats what I am doing - the commends and nothing. I think I am missing something. –  lunar Jul 14 '12 at 22:16
    
We have OpenJDK Java 7. –  Mitch Jul 14 '12 at 22:37
    
Mitch how does this comply to my post? By the commands I meant startup.sh etc. No positive result. –  lunar Jul 14 '12 at 22:53
    
Well, since you said that its not working, figured to check other items that can affect Tomcat. –  Mitch Jul 15 '12 at 7:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.