Servlet Interview Questions

Most Commonly asked  Servlet Interview Questions during the campus interviews. There is a list of 25 interview questions related to Servlet API.

  1. what is Servlet?
  2. Life cycle methods of servlet?
  3. Difference b/w web server and application server?
  4. Working of Servlet Container?
  5. what is ServletConfig Object?
  6. There can be more than one ServletConfig object for any Servlet or not?
  7. difference between ServletContext and ServletConfig?
  8. why we do not create Constructor for the Servlet?
  9. Is it possible to override init() method of HttpServlet? why?
  10. Difference Between init() and init(ServletConfig) methods of genericServlet?
  11. Difference between genericServlet and HttpServlet?
  12. What is Request Dispatcher in Servlet?
  13. Difference between include() and forward() methods in Servlet?
  14. Difference b/w sendRedirect and Request Dispatcher?
  15. How do we go with database connection and log4j integration in servlet?
  16. Is it needed to override service method every time?
  17. Explain Servlet Thread Safe?
  18. What is Servlet chaining?
  19. What are the Servlet attributes and their scope?
  20. what is session management in Servlet?
  21. How to make sure a servlet is loaded at the application startup?
  22. Different methods of session management?
  23. Explain Cookies in Servlet? and how it works?
  24. What is Deployment Descriptor?
  25. What are different ways for servlet authentication?
  26. How can we achieve transport layer security for our web application?
  27. Explain Listeners in Servlet?
  28. why we use Filters in Servlet ? what is filter chaining?
  29. URL Rewriting in Servlet?
  30. what is load-on-startup process?
    1. How to get the server information in a servlet?
  31. What are different ways for servlet authentication?
  32. What is Development descriptor?
  33. Explain Servlet life Cycle?
  34. Why do we have servlet listeners?
  35. What are important features of Servlet 3?
  36. How to handle exceptions thrown by application with another servlet?
  37. What is a deployment descriptor?

Thank you visitor…! ­čÖé www.ease2code.com

Speak Your Mind

*