| Author |
beginner question about servlets, running Java on server
|
Jaron Harrison
Greenhorn
Joined: Mar 19, 2004
Posts: 2
|
|
I have a couple questions related to this project a school team and I have: For our last Java project, we ran a Java program on my laptop as a server. Webpages and applets were served by IIS running on my machine, and the applets connected to the port the Java program was running on. The Java server had a GUI interface and we ran it through JBuilder (alternatively, the command prompt). Now, for our next project, we'd like to build the Java server to run on a remote web server. The program's purpose will be to coordinate between multiple users connecting via applets. Obviously, we can't go about it the same way as before--it can't be a GUI program and we don't know how to go about running it. Questions: 1. Is this where servlets come in? How does one go about running a servlet on a remote host? 2. I read here http://www.coderanch.com/t/204317/sockets/java/Baby about running a Java program via a CGI script. How does that work in? Basically, I'm interested in learning about the standard way this type problem is solved. Thanks for any help.
|
 |
Steve Leach
Ranch Hand
Joined: Sep 24, 2003
Posts: 46
|
|
Hi There's really not a lot of point in someone here typing out another introduction to servlets when there as so many available on the web already. Try... http://www.webdevelopersjournal.com/articles/intro_to_servlets.html In answer to your specific questions... 1. To run a servlet on a remote host, that host must be running a "web container" such as Apache Tomcat. You then install your servlet in that web container. 2. Running a Java application through CGI has nothing to do with servlets, and is quite inefficient. The introduction page I mentioned earlier explains why. Hope this helps.
|
 |
Jaron Harrison
Greenhorn
Joined: Mar 19, 2004
Posts: 2
|
|
Thank you for the information. Something I was after more than an introduction to servlets was an answer to the question, "Is servlets the right technology to accomplish what it is we're trying to do?" Basically, I was trying to validate that servlets would accomplish the same task of what we did earlier--connect many applet clients to one Java program, to facilitate and synchronize information gathering and processing. Once I determine that servlets is the right place to begin studying, I'll do all the reading I need to about it. Since you didn't contradict the idea that servlets would meet our needs, I'm assuming we're on the right track with servlets.
|
 |
 |
|
|
subject: beginner question about servlets, running Java on server
|
|
|