• 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
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

Servers

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have just started out with servlets and jsp from HFSJ book I have a few doubts which you can help me clear:

Q 1. What actually is web server?If I am making a web site from my computer then is my computer the web server?
Q 2. Difference between

hardware server and software sever
server and web server
server and server application
container and web server

Q 3. Where is the container actually placed ?
Q 4. What do you mean by deploying a servlet in a container?
Q 5. Difference between Applet and Servlet ? Are applets standalone programs and are servlets standalone programs too?
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

bharat bhasin wrote:
Q 3. Where is the container actually placed ?


search for "tomcat and apache.

bharat bhasin wrote:
Q 4. What do you mean by deploying a servlet in a container?



search for "servlet life cycle"

bharat bhasin wrote:
Q 5. Difference between Applet and Servlet ? Are applets standalone programs and are servlets standalone programs too?



also servlet vs applet in google [sorry if you dont have the net connection ]
 
Sheriff
Posts: 9704
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read this if it helps. Basically a web server is generally a server which can serve static content. A servlet container has the capability to run servlets inside it to produce dynamic content. The apache tomcat that we generally use works as both web server and servlet container (or it has apache web server inside it I don't remember). Hardware server is actually the machine that server the requests, and software server is the web server/container that runs on that machine to respond to requests. Applets are a completely different thing, servlets run on the server which applets run on the client side i.e. generally the browser.

HTH
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Are applets standalone programs and are servlets standalone programs too?



No

Applets run in an applet container == the browser and servlets run in a servlet container == a web server which can host servlets.

Some important differences if you are used to only programming desktop applications:

Neither applets or servlet are started with a main() method, instead the initial class instance creation is handled by the container.
Both applet and servlet APIs specify life-cycle methods which you should pay close attention to.

Bill
 
bharat bhasin
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot everybody..
But please clear this for me
What actually is web server?If I am making a web site from my computer then is my computer the web server?
 
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Bharat,

I think you should take one step back and think what is server ? We define the server as mentioned below-

Server Definition - A server is a a software program, or the computer on which that program runs, that provides a specific kind of service to client software running on the same computer or other computers on a network.

Example of server - An example is a web server, which stores files related to web sites and serves (i.e., sends) them across the Internet to clients (i.e., web browsers) when requested by a user. By far the most popular web server program is Apache, which is claimed to host more than 68 percent of all web sites on the Internet.

If you are hosting the site at your machine, then definitely you might be using some web server like IIS or apache. Now on the basis of above definition just think whether your machine is server or not..

I hope this would clear your doubt regarding web server.
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic