avoid confirmation of resubmission form

Asked

Viewed 275 times

0

I’m developing an application and when I click save it redirects to where I want updated. Only if I refresh the page it asks if I want to take advantage of past data before, I wouldn’t want it to happen

That’s how I’m doing it:

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

inserir a descrição da imagem aqui

1 answer

0

I resolved!

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

setTimeout(function (){
            location.href = "curso"
        },1000);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.