Servlets tutorial for beginners and professionals with examples on Basics, Life Cycle, Servlet Examples, Client Request, Server Response, Deployment Descriptor, Request Dispatcher, Http Codes, Servlet Filters, Cookies, Sessions and more.
As a technology servlet provides a model of communication between a web user request and the application or program on the web server.
Working servlet examples programs with output and source code.
Java Servlet tutorial:
- Servlet overview
- Life cycle of a servlet
- Servlet interface in java with example
- GenericServlet class in java with example
- HttpServlet class in java with example
- Deployment Descriptor: web.xml file with example
- welcome-file-list in web.xml with example
- load-on-startup in web.xml with example
- RequestDispatcher interface with example
- sendRedirect in servlet with example
- Servlet Init parameters and ServletConfig interface with example
- Servlet context parameters and ServletContext interface with example
- Servlet Hello World Example using annotation with example
- Session management and cookies in servlet with example
- Cookie in servlet with example
- Hidden field in servlet with example
- URL rewriting in servlet with example
- HttpSession in servlet with example
- Servlet filter in java with example
- FilterConfig interface with example
- All java servlet example in eclipse
Maven Eclipse Servlet
Servlet interview questions
- Servlets Interview Questions and Answers
- What is a Web application?
- What is a Web browser?
- What is different between web server and application server?
- What is a servlet container?
- What is MIME Type?
- Why do we need a constructor in a servlet if we use the init method?
- When servlet object is created?
- Who is responsible for creating the servlet object?
- What is the difference between HttpServlet and GenericServlet?
- What is HTTPServletRequest class?
- What is HTTPServletResponse class?
- How can we create deadlock condition on our servlet?
- For initializing a servlet can we use a constructor in place of init()?
- How to read form data in servlet?
- How to write html contents using servlets?
- How to send an authentication error from a servlet?
- What is servlet collaboration?
- What is lazy loading?
- How do we call one servlet from another servlet?
- What is the difference between sendRedirect and RequestDispatcher?
- Can we call a jsp from the servlet?
- How to configure a central error handling page in servlets?
- How to get session object?
- How to set attribute in session object?
- How to get attribute from session object?