Avatar ·

What is the difference between JSF, Servlet and JSP in Java web development?

Hello everyone! I'm a beginner Java developer learning to create web applications. I'm completely confused about three technologies: JSF, Servlet and JSP. They all seem to be used for the web, but how do I understand which one to choose? I tried to write a simple login form. I started with a servlet: ```java @WebServlet("/login") public class LoginServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String user = request.getParameter("username"); String pass = request.getParameter("password"); // validation... request.setAttribute("message", "Hello, " + user); request.getRequestDispatcher("welcome.jsp").forward(request, response); } } ``` Then I saw