What is the use of Servlets?
Servlets may be used at different levels on a distributed framework. The following are some examples of servlet usage:
-
To accept form input and generate HTML Web pages dynamically.
-
As part of middle tiers in enterprise networks by connecting to SQL databases via JDBC.
-
In conjunction with applets to provide a high degree of interactivity and dynamic Web content generation.
-
For collaborative applications such as online conferencing.
-
A community of servlets could act as active agents which share data with each other.
-
Servlets could be used for balancing load among servers which mirror the same content.
-
Protocol support is one of the most viable uses for servlets. For example, a file service can start with NFS and move on to as many protocols as desired; the transfer between the protocols would be made transparent by servlets. Servlets could be used for tunneling over HTTP to provide chat, newsgroup or other file server functions.