Reputation: 123
I've created a web project project using Java, Apache and MySQL on eclipse. Now the thing is that I want to host this for testing purpose (for free). I'm unable to find a way to it. (I'm unfamiliar with Maven but I've converted my project to Maven project using eclipse.) I've uploaded my project to github using egit. I tried to use Heroku and Openshift but I couldn't figure a way to it. Can anyone explain in detail how to host it and configure mySQL.?
Also, I've a free domain (.tk) if it can be of any use.
Upvotes: 0
Views: 1395
Reputation: 24565
I'd set up an amazon EC2-instance, install Java and since you're using JSP a server that provides a servlet container and JSP-engine e.g. Tomcat. Export your application as a .war file, upload it to your remote machine and deploy it to your Tomacat server. Here's a nice tutorial which should help you setting it all up:
https://readlearncode.com/cloud/amazon-free-usage-tier-installing-tomcat-7-on-an-ec2-linux-instance/
EDIT
You need to set the correct permissions for tomcat's webapps directory. Per default it belongs to the root user, so you either do a chmod -R 777 /opt/tomcat/webapps
which is unsafe
or
you set the tomcat group for the webapps directory:
chgrp -R tomcat /opt/tomcat/webapps
chmod -R g+w /opt/tomcat/webapps
For safety you can remove the write permissons after deploying:
chmod -R g-w /opt/tomcat/webapps
Also this link might help: Error while trying to deploy WAR on Tomcat8 on Ubuntu 15.04
Upvotes: 1