Servlet is a Java class which runs on a web server where back end application resides. This is a middle layer between web browser from where HTTP request originate and application web server.
Servlet helps us to get data submit by end users using POST request and return data to web browser using GET request from application web server.
Java web application J2EE helps us to create servlet classes and deploy on web server in the form of war file.
Java Servlet classes related classes belongs to javax.servlet and javax.servlet.http packages to implement servlet program.
HttpServlet class is an abstract class belongs to javax.servlet.http.HttpServlet package and extends GenericServlet abstract class. We can create servlet using HttpServlet class. HttpServlet methods GET, POST, PUT etc. allows us to handle HTTP requests.
Below architecture is all about send data from web browser to servlet program and back from servlet program to web browser.
Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.
📝 Blogs
javadoubts.com © All rights reserved