5

Installed Tomcat7 via repository via Synaptic package manager

enter image description here

& pasted my app(Beerv1) folder to /var/lib/tomcat7/webapps/ & also to /usr/share/tomcat7-root/

Still gets

HTTP Status 404 - /Beerv1/form.html

Using:

CLASSPATH: /usr/share/tomcat7//bin/bootstrap.jar:/usr/share/tomcat7//bin/tomcat-juli.jar touch: cannot touch ‘/usr/share/tomcat7//logs/catalina.out’: Permission denied ./catalina.sh: 387: ./catalina.sh: cannot create /usr/share/tomcat7//logs/catalina.out: Permission denied

This error shows after I uninstalled Tomcat7 & downloaded package manually from apache-tomcat website, extracted it to (/usr/share) & added CATALINA_HOME=<path> & JAVA_HOME=<path>.

My webapps weren't working on repository package. I pasted my webapps in both folder /usr/share/tomcat7-root & /var/lib/tomcat7/webapps. In Windows just pasting webapps worked but in Ubuntu doesn't. Does it require any extra configuration?

I read somewhere that myapp.xml file should be made in /etc/tomcat7/conf/catalina folder & writing etc configurations. But that also didn't worked.

guntbert
  • 13,475
Deepen
  • 4,109

1 Answers1

10

The "Permission denied" error for the logs directory most likely means that the OS user running the Tomcat process does not have write permission on that directory.

Assuming you are running Tomcat with user "tomcat7", try setting the ownership and filesystem permissions of the logs directory, e.g.:

sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7/logs
sudo chmod -R u+rw /usr/share/tomcat7/logs

If you are running Tomcat with a different OS user, replace tomcat7:tomcat7 by the username and primary group of that user, respectively.