GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Servlets
Go To First  |  Previous Question  |  Next Question 
 Servlets  |  Question 165 of 170    Print  
Difference Between Web Container and Web Server
What is the Difference Between Web Container and Web Server?
(Asked in Polaris Interview , held on April 11, Chennai)



  
Total Answers and Comments: 1 Last Update: April 15, 2008     Asked by: khadarzone 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: smartguy
 
The Webserver: Just Receive the request from the client and forward to Webcontainer, and do the Response vice versa.

Web Container: Creates HTTP Request and Response for the Servlet, calls the appropriate servlet service method (doGet or doPost) to service the client request.

Container also gives: Communication support(socket creation), Servlet life cycle management (Init(), Service() and Destroy()), Multithreading support, Declarative security(thru deployment descriptor) and  JSP support.

Source: Head First Servlet & JSP (SCWCD)

Above answer was rated as good by the following members:
umasankari86
April 14, 2008 23:13:15   #1  
smartguy Member Since: April 2008   Contribution: 1    

RE: Difference Between Web Container and Web Server
The Webserver: Just Receive the request from the client and forward to Webcontainer and do the Response vice versa.

Web Container: Creates HTTP Request and Response for the Servlet calls the appropriate servlet service method (doGet or doPost) to service the client request.

Container also gives: Communication support(socket creation) Servlet life cycle management (Init() Service() and Destroy()) Multithreading support Declarative security(thru deployment descriptor) and JSP support.

Source: Head First Servlet & JSP (SCWCD)

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

GenericServlet is for servlets that might not use HTTP, like for instance FTP service.As of only Http is implemented completely in HttpServlet. The GenericServlet has a service() method that gets called 
Latest Answer : HttpServlet is a specific case/implementation of GenericServlet.Thanks,Vinay ...

A GET request is a request to get a resource from the server. Choosing GET as the "method" will append all of the data to the URL and it will show up in the URL bar of your browser. The amount 
Latest Answer : 1) Get is Faster than Post..2) Get Is Idempotent i.e same work can be done again and again without harming database...3) Amount of data send is limited to few characters only and are visible in address bar, so sensitive data cannot be sent via GET. ...

Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface 
Latest Answer : ServletContext and ServletConfig are the interfaces provided by java class in servlet API.The vendors of web containers(WC) provides the classes implementing these interfaces.It is the responsiblity of web container(WC) to create ServletContext and ServletConfig ...

Each servlet has the same life cycle:A server loads and initializes the servlet (init())The servlet handles zero or more client requests (service())The server removes the servlet (destroy()) (some servers 
Latest Answer : Servlet life cycle defines the life process of the servlet. It has certain methods that comes into existence throughout the utilization of the servlet. Generally newInstance() method creates an object to the class. Similar way, internally the newInstance ...

ServeltRequest: which encapsulates the communication from the client to the server.ServletResponse: which encapsulates the communication from the servlet back to the client.ServletRequest and ServletResponse 
Latest Answer : when a request is sent from the browser to a servlet, the servlet object will be created by the webcontainer if we don't provide load-on-startup element.suppose if we provide load-on-startup element the webcontainer creates the servlet object when ...

Information such as the names of the parameters passed in by the client, the protocol (scheme) being used by the client, and the names of the remote host that made the request and the server that received 
Latest Answer : really, a must-know questions for a j2ee programmer ...

Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive. Servlets also address the problem 
Latest Answer : Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than traditional CGI and than many alternative CGI-like technologies. (More importantly, servlet developers get paid more than Perl programmers :-). Efficient. ...

Servlets are to servers. Applets are to browsers. Unlike applets, however, servlets have no graphical user interface. 
Latest Answer : Applets do not have main() method... ...

Answered by Scott on 2005-05-12 10:39:32: A servlet that implements SingleThreadModel means that for every request, a single servlet instance is created. This is not a very scalable solution as most web 
Latest Answer : Hi,As the name says Singlethread means only one thread, can access the service method of the servlet, to reduce the overhead the servlet container creates pool of servlet instances to handle n number of request that is depend on the servler configurationthankschandra ...

destroy() is a servlet life-cycle method called by servlet container to kill the instance of the servlet. The answer to your question is "Yes". You can call destroy() from within the service(). 
Latest Answer : Yes,we can call destroy method,but it is not recommended to call this method from our code since init(),service(),destroy()'s r servlet lifecycle methods.And in destroy()there will be aconfig variable which will be set to null if we override this ...


 Sponsored Links

 
Related Articles

SQL Server 2005 Integration Services Review

SQL Server 2005 Integration Services using Visual Studio 2005 A Beginner s Guide SQL Server 2005 A offering of Microsoft Corporation for database management the SQL server 2005 is one of the powerful database management systems in the world Available for integration in almost any system that uses Mi
 

SQL Server Integration Services

SQL Server Integration Services Here is a sample chapter from Beginners Guide to SQL Server Integration Services Using Visual Studio 2005 by Jayaram Krishnaswamy Environment set up for Visual Studio 2005 with respect to SSIS and multiple tasking Connecting to Microsoft Access Text Files Excel S
 

Web Server

Web Server A web server can be a program or the computer itself which receives the requests from various other browsers and responds to those requests These requests are all requests that are being sent for some documents There are two kinds of web servers available The web server program and the
 

Client-Server Models and N-Tier Applications

Client Server Models and N Tier Applications One of principal objective of Client Server methods is to provide data to an end user However Client Server architectural methodologies are much more complex Client Server describes the process wherein a client program generates contact with a separate se
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

Web Services and Client Server Technology

Web Services and Client Server Technology Introduction to Distributed Computing The Internet and expanded network connectivity established client sever models as the preferred form of distributed computing When talking about Client Server models of networked communication using web services the broa
 

Object-Oriented Client-Server Internet

Object Oriented Client Server Internet OCSI Environments as IT Infrastructure Client Server Basics Object Oriented Client Server Internet OCSI environments provide the IT infrastructure for supporting OCSI applications For our purposes infrastructure refers to operating systems networks middleware
 

N-Tier Client-Server Architecture

N Tier Client Server Architecture Description of 1 Tier and 2 Tier Web Applications This article will discuss the various architectures of Client Server environments Perhaps the most influential Client Server environment is the Internet and its global users With the increasing use of web application
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

Language Enhancements in SQL Server 2005

The T-SQL has been enhanced to include error handling, recursive query and to support the new database engine capabilities. Two new relational operators have been introduced—PIVOT and UNPIVOT for use in the FORM clause query. They perform manipulation on an input table valued expression an
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape