Nov 08

Servlets Tutorial : Explain about http protocol in detail?

Explain http protocol in detail?

1)      HTTP Protocol is an client server tcp based protocol.

2)      Browser or client communicates with web server using http protocol.

3)      Client sends the HTTP request  and sends to the server.

4)      The webserver receives the request and processes the request and generates the response. Continue reading

Nov 08

Servlets Tutorial : Important components of web application?

Explain the important components of Webapplication?

1) Browser

2) WebServer

3) DatabaseServer

1) Browser can be either internet explorer,Mozilla or safari.Browser is used to send the request to the server.

2) Webserver is the place where actual webapplication is deployed.Whenever browser sends request it sends it to the webserver.webserver gets the resource requested by client from DBMS or from any other external sources and gives the response back to the client. Continue reading

Nov 02

Servlets Tutorial 8 : Explain differences between Generic Servlet and Http Servlet?

Difference between Generic Servlet and HTTP servlet ?

Generic Servlet Http Servlet
1)      Generic Servlet is subclass of Servlet interface. 1)      Http Servlet is subclass of Generic Servlet.
2)      Generic servlets are protocol independent .It can access http,ftp etc 2)      Http Servlets are protocol dependent.It can access only http and https protocol. Continue reading
Nov 01

Servlet Tutorial 6: Importance of web.xml and elements in servlet

We can configure servlet in two ways :

1)   Using annotations

2)   Deployment descriptor

Deployment descriptor is an xml document named web.xml that is deployed with application and contains configuration settings for application.In this tutorial we are discussing some of the mandatory elements that need to defined in web.xml. Continue reading

Oct 19

Servlets Tutorial 2 : Explain Servlet api and its methods?

Explain Servlet api and its methods ?

1) All Servlets must  implement javax.servlet.Servlet interface either directly or indirectly.

2) Servlet container will create an instance of Servlet class and uses it to handle incoming requests.

3) Servlet interface defines methods that all servlets must implement.

4) Servlet class defines a contract between Servlet and Servlet container.

Continue reading