0

Just wondering how to refresh the jsp page after submitting data in the form.

if (request.getParameter("key") != null){
        if (request.getParameter("value") != null){
            Cookie cookie = new Cookie(request.getParameter("key"), request.getParameter("value"));
            response.addCookie(cookie);
        }
    }

should I add something following the response.addCookie ?

J.L
  • 592
  • 5
  • 17
  • 35

1 Answers1

0

suppose you submit to SubmitServlet from the form, then redict to the same JSP from it using RequestDispatcher or response.sendRedirect

Prasad Kharkar
  • 13,410
  • 5
  • 37
  • 56