Translate

Tuesday, 7 October 2014

Servlet

Servlet technology is used to create web application (resides at server side and generates dynamic web page).
web application example
javax.servlet package contains many classes and interfaces taht are used by servlet or web container.
                                    but javax.servlet.http package contains classes and interfaces that are used only for http request.

Interfaces in javax.servlet package

There are many interfaces in javax.servlet package. They are as follows:
  1. Servlet
  2. ServletRequest
  3. ServletResponse
  4. RequestDispatcher
  5. ServletConfig
  6. ServletContext
  7. SingleThreadModel
  8. Filter
  9. FilterConfig
  10. FilterChain
  11. ServletRequestListener
  12. ServletRequestAttributeListener
  13. ServletContextListener
  14. ServletContextAttributeListener

Monday, 6 October 2014

HTTP,Get and Post method

HTTP

  • HTTP is a protocol which is used by client and server to communicate on web.
  • HTTP is stateless protocol i.e http clients can make only one request at per connection. Means http clients connects to server to send one request and disconnects.This mechanism allows more users to connect to the specific server over given period of time.
  
               HTTP protocol
HTTP METHODS

Normally Get and Post method is used to send the request to server.

Get

It is used to retrieve the information from server.In this method the contents are exposed in URL,so it is not secured.Data is sent in header to the server.
It can send only limited amount of data.Get contents can be Bookmarked.

Post

Request for server to accept the entity enclosed in the body of HTTP method.Data are not exposed in URL,so it is more secured.Large amount of data can be sent. Post request can not be Bookmarked. Data is sent in body of request.

Anatomy of Get request
   
Anatomy of Post request





Sunday, 5 October 2014

Introduction to web

Introduction to web

web consist of billions of clients and server connected to wires or wireless network.The web clients make request to  web server. Web server recieves the request, finds the resource and respond to the clients.When a server responds to the client, it sends some type of contents to the web clients.The clients use web browser to send the request to server.Normally server sends the response to the clients with set of instructions written in HTML.All the web browser basically know how  to display the web contents written in HTML.

client and server

 Website and Webapplication

A website is collection of static files such as HTML,images, graphics etc. It seems same to all user.
Web-application is the website with dynamic functionality on server.It is not same to all user.In it login operation is performed and the distinct contents are displayed according to the user.for example Facebook,Twitter,Gmail,Google etc