Servlets are Java programs that run on web servers and respond to HTTP requests. There are two types of servlets: generic servlets and HTTP servlets. Generic servlets handle any type of request while HTTP servlets specifically handle HTTP requests. The life cycle of a servlet involves initialization, service, and destruction. Servlets use cookies, sessions, and different request methods like GET and POST to maintain state between client requests.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Servlets are Java programs that run on web servers and respond to HTTP requests. There are two types of servlets: generic servlets and HTTP servlets. Generic servlets handle any type of request while HTTP servlets specifically handle HTTP requests. The life cycle of a servlet involves initialization, service, and destruction. Servlets use cookies, sessions, and different request methods like GET and POST to maintain state between client requests.
Servlets are Java programs that run on web servers and respond to HTTP requests. There are two types of servlets: generic servlets and HTTP servlets. Generic servlets handle any type of request while HTTP servlets specifically handle HTTP requests. The life cycle of a servlet involves initialization, service, and destruction. Servlets use cookies, sessions, and different request methods like GET and POST to maintain state between client requests.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Servlets are Java programs that run on web servers and respond to HTTP requests. There are two types of servlets: generic servlets and HTTP servlets. Generic servlets handle any type of request while HTTP servlets specifically handle HTTP requests. The life cycle of a servlet involves initialization, service, and destruction. Servlets use cookies, sessions, and different request methods like GET and POST to maintain state between client requests.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 2
Basic Java servlet interview questions
1. What is the difference between CGI and Servlet?
2. What is meant by a servlet? 3. What are the types of servlets? What is the difference between 2 types of Servlets? 4. What is the type of method for sending request from HTTP server ? 5. What are the exceptions thrown by Servlets? Why? 6. What is the life cycle of a servlet? 7. What is meant by cookies? Why is Cookie used? 8. What is HTTP Session? 9. What is the difference between GET and POST methods? 10. How can you run a Servlet Program? 11. What is the middleware? What is the functionality of Webserver? 12. What webserver is used for running the Servlets? 13. How do you invoke a Servelt? What is the difference in between doPost and doGet methods? 14. What is the difference in between the HTTPServlet and Generic Servlet? Explain their methods? Tell me their parameter names also? 15. What are session variable in Servlets? 16. What is meant by Session? Tell me something about HTTPSession Class? 17. What is Session Tracking? 18. Difference between doGet and doPost? 19. What are the methods in HttpServlet? 20. What are the types of SessionTracking? Why do you use Session Tracking in HttpServlet?