Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used the sudo apt-get install tomcat7-examples.

They were installed in /usr/share/tomcat7-examples/examples directory.

Tomcat could not locate them from the URL :    
HTTP Status 404 - /examples/

I attempted to copy them to the webapps directory but that failed.

$ sudo cp /usr/share/tomcat7-examples/examples/*  /var/lib/tomcat7/webapps/examples/.

cp: omitting directory 'jsp'    
cp: omitting directory 'servlets'  
cp: omitting directory 'WEB-INF' 

What am I missing?

Havingsame problem with docs, common, and admin.

share|improve this question

Don't copy anything.

After you have started your copy command, you should now remove the folder /var/lib/tomcat7/webapps/examples via

sudo rm -r /var/lib/tomcat7/webapps/examples

The correct way

After installing the package tomcat7-examples restart your tomcat7

sudo service tomcat7 restart

After that open the URL http://localhost:8080/examples/ and you will see this

enter image description here

share|improve this answer

Use cp -r to copy over directories. Also make sure target directories exist

share|improve this answer
In it's current state, the answer is not very useful. Would you elaborate the answer to include more details like an example? – Registered User Jun 17 '14 at 3:51

Your Answer


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.