avoid Form Resend Confirmation

0

I'm developing an application and when I click on save it redirects to where I want it updated. But if I refresh the page it asks if I want to take advantage of the data passed before, I would not want that to happen

That's how I'm doing:

 boolean teste = cc.inserir(curso);
 RequestDispatcher rd = req.getRequestDispatcher("/index.jsp");
 rd.forward(req, resp);
  

    
asked by anonymous 01.12.2016 / 23:26

1 answer

0

I solved!

I added a javascript to return the value whether it worked or not. This javascript redirects if operation is successful

setTimeout(function (){
            location.href = "curso"
        },1000);
    
02.12.2016 / 12:51