I just followed the steps provided by this site to install Tomcat 7 on Ubuntu:
Please remember to change the location or the site where you want to download Tomcat 7 as the provided URL is for Tomcat 6. This also depends which beta version that you are trying to install as well. You can refer to this page about this version and copy the URL and use it with the wget command. For example, I’m downloading v7.0.4-beta and the command that I’m using is:
sudo wget http://apache.hoxt.com/tomcat/tomcat-7/v7.0.4-beta/bin/apache-tomcat-7.0.4.tar.gz
Everything is working fine except when I tried to configure the Tomcat in Eclipse, I encountered a failure to start the server:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.
If compare with the projects that I had copied from the previous laptop, I should have the following files in the <eclipse workspace>/Servers/<Tomcat version> Server at localhost-config:
When I checked my current Eclipse workspace, the listed files do not exist in the intended directory. To resolve the problem, you need to copy those files from /usr/local/tomcat/conf directory to the intended location:
yee@chimney:/usr/local/tomcat/conf$ ls -la
drwxr-xr-x 2 root root 4096 2010-10-15 07:27 .
drwxrwxr-x 9 root root 4096 2010-10-24 12:46 ..
-rw——- 1 root root 10650 2010-10-15 07:27 catalina.policy
-rw——- 1 root root 4990 2010-10-15 07:27 catalina.properties
-rw——- 1 root root 1394 2010-10-15 07:27 context.xml
-rw——- 1 root root 3152 2010-10-15 07:27 logging.properties
-rw——- 1 root root 6268 2010-10-15 07:27 server.xml
-rw——- 1 root root 1530 2010-10-15 07:27 tomcat-users.xml
-rw——- 1 root root 51579 2010-10-15 07:27 web.xml
yee@chimney:/usr/local/tomcat/conf$ sudo cp * /home/yee/eclipseWorkspace/Servers/Tomcat v7.0 Server at localhost-config/
Also, remember to change the permission for all the files else you will still encounter the error such as:
Could not read file: /home/yee/eclipseWorkspace/Servers/Tomcat v7.0 Server at localhost-config/server.xml.
/home/yee/eclipseWorkspace/Servers/Tomcat v7.0 Server at localhost-config/server.xml (Permission denied)
That’s it. No more errors