2

I installed tomcat7 via the command sudo apt-get install tomcat7, now I went to /usr/share/tomcat7/bin and inputted catalina.sh but the following error occured

Cannot find /home/mukund/usr/share/tomcat7/bin/setclasspath.sh
This file is needed to run this program

What did I wrong? How to start apache tomcat? Please give the solution in step by step
Thanks

2
  • Did you edit your catalina.sh? If you do, please post it here.
    – Danatela
    Apr 11, 2014 at 6:32
  • no nothing, didint do anything, just installed by sudo cammand, searched where it is installed, found catalina.sh and typed ./catalina.sh
    – Mukund
    Apr 11, 2014 at 6:35

1 Answer 1

2

When you install tomcat7, you have nothing to type to start it. It starts up automatically. Notice in install log:

$ sudo apt-get install tomcat7
...
Creating config file /etc/logrotate.d/tomcat7 with new version
 * Starting Tomcat servlet engine tomcat7                                [ OK ]
Setting up authbind (2.1.1) ...
Processing triggers for ureadahead ...

So, to test it, you have to write in browser http://localhost:8080. And you will see the page:

It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!

This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html

Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING.txt.gz.

You might consider installing the following packages, if you haven't already done so:

tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking here.

tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking here.

tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml.

To start/stop Tomcat, use service tomcat7 start/stop/restart:

$ sudo service tomcat7 stop
 * Stopping Tomcat servlet engine tomcat7                                [ OK ] 
$ sudo service tomcat7 start
 * Starting Tomcat servlet engine tomcat7                                [ OK ] 
4
  • and i tried to connect the apache tomcat server 127.0.1.1:8080 via web browsers, its works, i tried the same with android emulator, its not connectiong, how to make it connect?
    – Mukund
    Apr 11, 2014 at 7:47
  • i tried 10.0.2.2, there is also an issue, if you try localhost/index.html, problem loading page is occuring, any configuration issues?
    – Mukund
    Apr 11, 2014 at 7:48
  • Probably you should ask another question or come into chat.
    – Danatela
    Apr 11, 2014 at 8:06
  • yes i did check askubuntu.com/questions/446333/…
    – Mukund
    Apr 11, 2014 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .