Explain me what is a servlet?
Submitted by: Muhammad☛ Java Servlet is server side technologies to extend the capability of web servers by providing support for dynamic response and data persistence.
☛ The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing our own servlets.
☛ All servlets must implement the javax.servlet.Servlet interface, which defines servlet lifecycle methods. When implementing a generic service, we can extend the GenericServlet class provided with the Java Servlet API. The HttpServlet class provides methods, such as doGet() and doPost(), for handling HTTP-specific services.
☛ Most of the times, web applications are accessed using HTTP protocol and thats why we mostly extend HttpServlet class. Servlet API hierarchy is shown in below image.
Submitted by: Muhammad
☛ The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing our own servlets.
☛ All servlets must implement the javax.servlet.Servlet interface, which defines servlet lifecycle methods. When implementing a generic service, we can extend the GenericServlet class provided with the Java Servlet API. The HttpServlet class provides methods, such as doGet() and doPost(), for handling HTTP-specific services.
☛ Most of the times, web applications are accessed using HTTP protocol and thats why we mostly extend HttpServlet class. Servlet API hierarchy is shown in below image.
Submitted by: Muhammad
Read Online Sr.Java Web Developer Job Interview Questions And Answers
Top Sr.Java Web Developer Questions
☺ | Do you know what is composition in Java? |
☺ | Please explain what is the difference between execute, executeQuery, executeUpdate? |
☺ | Tell us what is Hibernate Framework? |
☺ | Tell me what are the different tags provided in JSTL? |
☺ | Tell us what is difference between Error and Exception? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |