Tutorials, Free Online Tutorials,It Challengers provides tutorials and interview questions of all technology like java tutorial, android, java frameworks, javascript, core java, sql, php, c language etc. for beginners and professionals.

Breaking

Introduction to Servlet

Introduction to Servlet


  • Servlets are modules that run inside request/response-oriented servers, such as Java-enabled webservers, and extend them in some manner. 
  • For example, a servlet might be responsible for taking data in anHTML order-entry form and applying the business logic used to update a company's order database.
  • Servlets are to servers what applets are to browsers.
  • The Servlet API, which you use to write servlets, assumes nothing about how a servlet is loaded,the server environment in which the servlet runs, or the protocol used to transmit data to and from the user.
  • This allows servlets to be embedded in many different web servers.
Servlets are an effective substitute for CGI scripts:-
  •  They provide a way to generate dynamic documents that is both easier to write and faster to run.
  •  They also address the problem of doing server-side programming with platform-specific APIs. Servlets are developed with the Java Servlet API, a standard Java extension.
Example Uses
  • A few of the many applications for servlets include, Processing data Posted over HTTPS using an HTML form, including purchase order or credit card data. 
  • A servlet like this could be part of an order-entry and processing system, working withproduct and inventory databases, and perhaps an on-line payment system.
  • Allowing collaboration between people.
  •  A servlet can handle multiple requests concurrently;
  •  they can synchronize requests to support systems such as on-line conferencing.
  • Forwarding requests. Servlets can forward requests to other servers and servlets.
  • This allows them to be used to balance load among several servers that mirror the same content.
  • It also allows them to be used to partition a single logical service over several servers, according to task type or organizational boundaries.
  • Being a community of active agents. A servlet writer could define active agents that share workamong each other. Each agent would be a servlet, and the agents could pass data among themselves.
• Servlets are modules of Java code that run in a server application
• Servlets are not restricted to but most commonly used with HTTP
• Servlets use extension classes in
–javax.servlet (the basic Servlet framework)
–javax.servlet.http (extensions for HTTP requests)

No comments:

Post a Comment