How do I go from one JSP page to another by clicking the submit button?

I want to go from one JSP page to another JSP page by clicking the Submit button. How to do it easily?

+3
source share
1 answer
  • use <form action="page2.jsp">
  • or send a servlet using <form action="targetServlet">, and then:
    • redirect to page2 using response.sendRedirect("page2.jsp")
    • or go to page2 using request.getRequestDispatcher("page2.jsp").forward()
+4
source

Source: https://habr.com/ru/post/1750237/


All Articles