• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

beginner question about servlets, running Java on server

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 https://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.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic