I want to make a web service in java which will take arguments and do processing and return a json response. I am not been able to figure out how to deploy this service on amazon ie (on ec2 or some where else) . what will be the url to hit my service and where to save my java program. Please provide any better way if there is any.
Asked
Active
Viewed 65 times
2
-
1How are you currently running this Java app? You could deploy a Tomcat server on EC2 and use that. – greg_diesel Jun 17 '15 at 13:39
1 Answers
1
This is pretty standard in terms of deployment.
First - create a EC2 box, this will be your server, you'll need to configure the firewall to allow connections over HTTP port 8080.
Second - install Tomcat on said EC2 box.
Third - upload your war file to said Tomcat instance.
Fourth (optional) - give your EC2 box a static IP.
There's a very similar answer here, the only really extra bit you'll have to do is connect to a database if that's what your web service does. Consider also you may want to put an apache config to route requests from 80 to 8080, but it's really up to you.
-
Thank You sir. Looks straight forward. Will ask if stumbled into any problem. – Kharoud Jun 17 '15 at 13:52