Monday, September 21, 2015

What is the difference between web and application server?

In order to execute a Java application, A web or application server having a servlet container is required. A web server knows only how to intercept HTTP requests and how to return contents of static web pages. It doesn’t know how to execute servlets. A servlet container extends the functionality of a web server by […]
Read complete post

Difference between get and post request?

Get request is designed to fetch (read) contents  from the server and the Post request is designed to submit (save or update) contents on the server. This perspective of receiving and giving provides the base for understanding all their differences. Difference between get and post request: In get request, data are sent as part of the […]
Read complete post

what is the difference b/w static & dynamic website?

In the current information age, web sites have become an important tools in the hands of governments, business organizations and individuals to reach out to their target audiences beyond geographical boundaries. In a simple, technical jargon free and easy to understand way: A web site is a collection of web pages which are stored on […]
Read complete post

How a Servlet is defined?

A servlet class can be defined by directly implementing the Servlet interface or by extending a helper class javax.servlet.GenericServlet provided by servlet API. It is an abstract class, which implements Servlet interface and defines all its methods except service() i.e. In its sub class, an application programmer need to define only the service method. Following […]
Read complete post

Servlet life cycle

Servlet life cycle describes how and when a servlet object is created and initialzed, how it processes requests and how and when it is destroyed by the server. Servlet life cycle is defined by javax.servlet.Servlet interface. Life cycle methods of Servlet interface: init(): This method is invoked by the web server only once, just after […]
Read complete post

What is Servlet?

The term Servlet has two different meaning in two different contexts. In the broader context, it represents an API of dynamic web application development and in the narrow context, it represent a Java class which is defined using this API for processing requests in a web application. As API, Servlet contains interfaces and classes which […]
Read complete post

What is a cookie and why is it needed?

What is a cookie? A cookie is a token which is generated by the server or a servlet and is sent as part of the response to be received back from the client as part of the subsequent requests. This token contains some information of the client in the form of key-value pair. What is […]