1

I'm writing a client-server application.
The client application will run on android device, and I'm using ec2 with tomcat6 as a server. I wrote a server application which I want to run constantly on the server.
How do I do it?
Is this implemented with servlet, and how? Also, I'm not sure, who starts the server-application once the server is up?

I have a basic knowledge of how servlets work, I created an http servlet which adds rows to database (RDS) through html page.

Bart
  • 19,692
  • 7
  • 68
  • 77
kande
  • 559
  • 1
  • 10
  • 28
  • Yes, you can build a servlet and run it in tomcat (or jetty/jboss/glassfish...), and open it up for public access (listening on an external IP). And you're in charge of making sure your servers are up, so you will have to learn how to deploy your servlets into tomcat and start your servers (usually done with startup scripts). Unfortunately your question is very broad, so I think you should read the [Java Servlet tutorial first](http://docs.oracle.com/javaee/6/tutorial/doc/bnafd.html). – wkl May 10 '12 at 13:07
  • thanx for your answer... "so you will have to learn how to deploy your servlets into tomcat and start your servers" that's exactly what i'm asking.... how to do that? – kande May 10 '12 at 21:13
  • 1
    That's a pretty loaded question, because I don't know the extent of your knowledge. Have you ever built a `.war` file? Ever used a build tool like Maven or sbt or Ivy2? http://stackoverflow.com/questions/1001714/how-to-create-war-files is one question about creating war files. My favorite build tool for creating Java-based web projects is [`sbt`](https://github.com/harrah/xsbt/wiki), which will create wars (and deploy them) for you. – wkl May 10 '12 at 21:26
  • i didnt do any of those, i'll check out the link you gave me. and if i need help, i'll ask here again thank you very much!!! – kande May 10 '12 at 21:36
  • 1
    Read through some of those links, try out some stuff - if you run into problems, post a targeted question and you'll get better help. Very broad questions tend either to get closed or ignored because they're hard to give a solid answer to. – wkl May 10 '12 at 21:38
  • You are right!! thank you very much, you've been very helpful! – kande May 11 '12 at 07:25

0 Answers0