0
votes

I have created Java Web Application that is running on Apache Tomcat. Now, I need to upload it on a remote server. I want to use AWS. I'm new to AWS. I created EC2 instance and copy my .war file to it using this command:

scp -i mykey.pem /Path/to/my/app.war  [email protected]:/var/www/html/

the file is copied to the /var/www/html/. However, when I tried to access the website content it doesn't show my app content, it downloads the .war file to local machine in downloads folder. Could anyone told me what is wrong? How I can run my web application on EC2?

1

1 Answers

0
votes

One easy way is:

Copy the war file to (TOMCAT_HOME/webapps/) folder and restart Tomcat .