• Post Reply Bookmark Topic Watch Topic
  • New Topic

Apache client/server question  RSS feed

 
J. Ryan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple Java client-server application that works like I want it to when I run it using localhost. This is probably a real beginner's question, but how I go about deploying the server side of the application to a web server running Apache? What directory does it go in? When using a localhost, I have to start the server application first before connecting clients. How do I do this using Apache? Thank you for any insight.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a bit confused about the kind of application. You said "Java client/server" - does that mean both the client and the server are written in Java? Is the server a standalone program, or is a Servlet/JSP-based web application? If it is a web app, you'd need a servlet container like Tomcat in addition to Apache (and Apache might not even be necessary).

The beauty about client/server applications is that it shouldn't matter on which machine the server runs - just tell the client the machine name, and off you go.

Can you tell us a bit more about the architectural setup?
 
J. Ryan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, both client and server are written in Java. But I think I see what you're saying. Apache really has nothing to do with it, right? Am I correct in thinking that all I have to do to deploy it is run the server program (written in Java) on the machine I want and open the correct port, then connect clients to it?

If this belongs on another forum, please move it. Thanks.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so the server is something you wrote, and is independent of any servlet container or web server. Cool. With all the talk about web apps and frameworks, it's often forgotten that this kind of thing is possible, and actually fairly easy to do in Java.

Your approach sounds right, although you'll need to ensure that the server stays up and running; not hard to do on Unixish Os'es, but you'd need to use a service wrapper for Windows.

And yes, now that neither Apache httpd nor Tomcat are involved, I'm going to move this to the Sockets and Internet Protocols forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!