In a nutshell, a servlet is a web component that generates dynamic content. Servlets are small, platform-independent Java classes compiled to an architecture-neutral bytecode that can be loaded dynamically into and run by a servlet container or an application server. Servlets interact with web clients (i.e., web browsers) via a request-response paradigm implemented by the servlet container. This request-response model is based on the behavior of HTTP.
The Java servlet’s request-response paradigm
What is a Java servlet? A servlet is an extension to a web server and is used for generating dynamic web content. A servlet gets an HTTP request from a client, such as a web browser; processes the request; and returns the HTTP response to the client. The response typically contains HTML code, XML, or an image (binary data) that is displayed by the web browser. A Java servlet enables dynamic web content from a static web page. Much in the same way other existing scripting languages like CGI or ASP can generate dynamic content based on input given to it by a user, so too does a Java servlet. The advantage of a Java servlet over these other existing scripting languages is its portability. Java was specifically designed so that an application could be written once and run on any operating systems with a virtual machine. Java servlets take this concept further by extending it into the field of server-side scripting.
Servlets are small Java classes that run in a server application (hence the name “servlets,” similar to “applets” on the client side) to answer client requests. Servlets are not tied to a specific client-server protocol, but they are most commonly used with HTTP and the word “servlet” is often used in the meaning of “HTTP servlet.”
Servlets make use of the Java classes in these packages:
Typical uses for HTTP servlets include
A Java servlet engine is the Java application that executes the Java servlet. It is a mechanism by which a Java application can be written to provide dynamic web content.
JDBC Related Interview Questions
|Core Java Interview Questions||JSP Interview Questions|
|Java Servlets Interview Questions||EJB(Enterprise JavaBeans) Interview Questions|
|JSTL(JSP Standard Tag Library) Interview Questions||JNDI (Java Naming and Directory Interface) Interview Questions|
|Java Bean Utils Interview Questions||AWT (Abstract Window Toolkit) Interview Questions|
What Is Jdbc Programming?
Database Metadata, Part 1
Database Metadata, Part 2
Exploring Driver Property Information
Rowset Metadata A
Web Access To Metadata,part 1
Web Access To Metadata, Part 2
Rdf And Jdbc Metadata
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.