Interview Questions And Answers

Q: - What are the uses of Servlet?

Processing and/or storing data submitted by an HTML form.
Providing dynamic content, e.g. returning the results of a database query to the client.
A Servlet can handle multiple requests concurrently and be used to develop high performance system
Managing state information on top of the stateless HTTP, e.g. for an online shopping cart system which manages shopping carts for many concurrent customers and maps every request to the right customer.

Submitted By:-Williams            Email-ID: - tomwilliams45@rediff.com

Q: - What is the GenericServlet class?

GenericServlet is an abstract class that implements the Servlet interface and the ServletConfig interface.

Submitted By:-Williams            Email-ID: - tomwilliams45@rediff.com

Q: - Why is HttpServlet declared abstract?

The HttpServlet class is declared abstract because the default implementations of the main service methods do nothing and must be overridden.

Submitted By:-Williams            Email-ID: -tomwilliams45@rediff.com