1

I'm trying to deploy a Vaadin 7 example.war file in tomcat 7, using an EC2 server. I upload the file to /var/lib/tomcat7/webapps but then when I go to myIp:8080/example it doesn't find the resource.

Any idea why?

Thanks!

SSH
  • 1,609
  • 2
  • 22
  • 42
jhugo
  • 181
  • 2
  • 12

2 Answers2

1

You have to use the tomcat manager (usually http://[YourHost]:8080/manager) to add a new webapp / war file, it is not just uploading the file to the webapps folder.

To install tomcat, the manager webapp, and configuring access credentials (debian or debian based distros), check this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-apache-tomcat-on-a-debian-server

Miguel Mesquita Alfaiate
  • 2,851
  • 5
  • 30
  • 56
  • Thanks for your answer!!.../manager also doesn't finds the resource...(:8080 does work by the way) – jhugo Jun 03 '15 at 16:49
  • @jhugo you have to install the manager webapp. It depends on your distro, with debian it's tomcat-admin package – Miguel Mesquita Alfaiate Jun 03 '15 at 17:04
  • thanks....I can't acces /manager/html...I need to define users at $CATALINA_HOME/conf/tomcat-users.xml .... how can I do this? – jhugo Jun 03 '15 at 18:20
  • @jhugo check this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-apache-tomcat-on-a-debian-server – Miguel Mesquita Alfaiate Jun 03 '15 at 18:42
  • Thanks @BlunT ....Where can I download the manager for tomcat 7 from? I tried sudo apt-get install tomcat7-admin tomcat7-examples tomcat7-docs (also with yum instead of apt-get) but it is not available on EC2 – jhugo Jun 04 '15 at 13:34
  • @jhugo what is the distro you are using? I do not use EC2 so I don't know if there is any limitation on using apt-get...that tutorial is for debian based flavors of linux. – Miguel Mesquita Alfaiate Jun 04 '15 at 13:35
  • rhel fedora Amazon linux AMI 2015.03 – jhugo Jun 04 '15 at 13:40
  • @jhugo you know that google can help you right? Try this: http://www.unixmen.com/howto-install-tomcat-in-centos-fedora-the-easy-way/ – Miguel Mesquita Alfaiate Jun 04 '15 at 13:48
  • Thank you for your patience BlunT, I'm kinda new on this....I managed to install de manager, using sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps ...Now my problem is that when I try to deploy the app, I get org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba2]] , being prueba2 my app...any idea why? – jhugo Jun 04 '15 at 14:06
  • @jhugo I have no idea, but a quick search through google leads to a similar question about the same error here in SO: http://stackoverflow.com/questions/14750747/org-apache-catalina-lifecycleexception-failed-to-start-component-standardengin – Miguel Mesquita Alfaiate Jun 04 '15 at 14:16
1

Solved!...

To install the manager:

sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps

To solve the Java Version mismatch, org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba2]]:

On Eclipse:

Preferences >> Java >> Installed JREs

On EC2 server:

sudo yum remove java-1.7.0-openjdk
sudo yum install java-1.8.0

Then reinstall Tomcat7 and restart

Thanks @BlunT for all the help!!

jhugo
  • 181
  • 2
  • 12