Feature of Servlet


Prev Tutorial Next Tutorial

Features of Servlet

Servlet is a java program, exist and executes in j2ee servers, used to received the http protocol request, process and send response to client.

Using Servlets, we can collect input from users through web page forms, present records from a database or another source, and create web pages dynamically. Some important features of servlet are; More secure than normal java code, portability, robust, secure, servlet code have better performance etc

features of servlet

Main Features of Servlet are given blow;

Advantage of Servlet

  • Better performance:
  • Portability
  • Robust
  • Secure
  • Inexpensive
  • Extensibility
  • Efficiency
  • Integration
  • Persistent
  • Server Independent
  • Protocol Independent

Better performance: Because it creates a thread for each request not process (like CGI).

Portability: Because it uses java language and java is robust language.

Robust: Servlet are managed by JVM so no need to worry about memory leak, garbage collection etc.

Secure: Because it uses java language and java is a secure language. Java have automatic garbage collection mechanism and a lack of pointers protect the servlets from memory management problems.

Inexpensive There are number of free web servers available for personal use or for commercial purpose. Mostly web server are very costly. So by using free web server you can reduce project development price.

Extensibility The servlet API is designed in such a way that it can be easily extensible. Servlets being written in Java, can be extended and polymorphed into the objects that suits the user requirement.

Efficiency Servlets invocation is highly efficient as compared to any CGI programs.

Integration Servlets are tightly integrated with the server. Servlet can use the server to translate the file paths, check authorization, perform logging and MIME type mapping etc.

Persistent: Servlets remain in memory until explicitly destroyed. This helps in serving several incoming requests. Servlets establishes connection only once with the database and can handle several requests on the same database.

Server Independent: Servlets are compatible with any web server available today.

Protocol Independent: Servlets can be created to support any protocols like FTP commands, Telnet sessions, NNTP newsgroups, etc. It also provides extended support for the functionality of HTTP protocol.

Fast: Since servlets are compiled into bytecodes, they can execute more quickly as compared to other scripting languages. The bytecode compilation feature helps servlets to give much better performance. In addition, it also provides advantage of strong error and type checking.


Prev Tutorial Next Tutorial

Advertisements




Download Projects