❮ Previous Next ❯

Servlet Interview Questions

Servlet is one of the very important topic of Java EE and also JAVA frameworks like Spring and Struts.This makes servlet interview questions as a hot topic in interviews. Here I am providing a list of servlet interview questions with answers which help you to tackle most of the interview questions related to servlets and web applications in java.

  1. What is the difference between web application and enterprise application?.
  2. What is the difference between web server and application server?
  3. What is a servlet?
  4. How many objects of a servlet is created?
  5. What is the servlet lifecycle?
  6. What is the difference between doGet() and doPost() method?
  7. What are the tasks of servlet container?
  8. What is ServletConfig object?
  9. What is ServletContext object?
  10. What is the difference between ServletConfig and ServletContext?
  11. What is the difference between PrintWriter and ServletOutputStream?
  12. What is the difference between GenericServlet and HttpServlet?
  13. What is servlet collaboration?
  14. What is the objective of RequestDispatcher interface?
  15. What is web.xml file(deployment descriptor file)?
  16. In web.xml file   <load-on-startup>1</load-on-startup> is defined between <servlet></servlet> tag what does it means.
  17. How can we create a deadlock condition on our servlet?
  18. Do we need to override service() method?
  19. For initializing a servlet can we use a constructor in place of init()?
  20. How can you get the information about one servlet context in another servlet?
  21. Why we need to implement Single Thread model in the case of Servlet.
  22. What is SingleThreadModel interface?
  23. What is session management?
  24. How Cookies work in servlets?
  25. How to notify an object in session when a session is expired?
  26. Why do we have servlet filters?
  27. Why do we have servlet listeners?
  28. How can we upload the file to the server using servlet?
  29. What is war file and how to create war file?
  30. What are the annotations used in servlet?
  31. What is the importance of welcome file list?
  32. What are different ways for servlet authentication?
  33. How to get IP address of client in servlet?
  34. What is the use of attribute in servlets?
  35. How to perform database connection and log4j integration in servlet?


❮ Previous Next ❯

Follow Us


Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Email: info@silantechnology.com
      Phone: 0674-2361252
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved