6

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 :

127.0.0.1:8080/examples/    
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.

2 Answers2

0

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

0

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

A.B.
  • 92,125