We are moved to new domain
Click -> www.ehowtonow.com
Tuesday, 5 November 2013

Servlet Introduction


Servlet

Servlet is a component based, platform independent technology for build the web application.Initially Common Gateway Interface (CGI) server-side scripts were the main technology for build web application with dynamic content.Although widely used CGI scripts had many shortcoming, including platform dependence and lack of scalability. To address these limitations, Java Servlet Technology was created as a portable way to provide dynamic content.
Java Servlet Technology is used to create Dynamic web applications which runs on a web or Application server (like Tomcat, JBos, Web Logic,…).Servlet is Three Tier Component Technology.The Three Layers are
  1. HTTP Server
  2. Servlet Program
  3. Database
The Servlet act as middle layer between HTTP request coming from web browser or other HTTP clients or the applications runs on HTTP Server.
Advantage of Servlet
Servlet has  many advantage over CGI. Servlet can handle multiple request.The web container creates thread for handling multiple requesting coming from different web browser or HTTP client or application runs on HTTP server .CGI creates process. Threads have a lot of advantages over the processes. Threads can share the common memory, lightweight, cost of communication between threads are low.
  • Platform Independent
  • Portability
  • High Performance : – it creates thread for each request not process.
  • Secure
  • Robust
Servlet Architecture
servlet-architecture
Servlet Packages
The javax.servlet and javax.servlet.http packages provide interface and classes for create the servlet.All the servlet must implement the Servlet interfaces, which defines lifecycle methods.
Types of Servlet
  • GenericSerlvet – you can use when implementing a generic service
  • HttpServlet – you can use to handle HTTP-specific services.

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Servlet Introduction Rating: 5 Reviewed By: eHowToNow