How to stop loading of Post servlet on Page reload?

49 views Asked by At

I'm new to web development and currently trying to build a custom Jira Plugin, where I'm rendering velocity template files on UI for Get and Post Servlet requests.

On UI, we are loading a velocity template file to render the Form which consist of a Submit button. On click of submit button Post Servlet will be invoked and required operation is completed in the backend. But now the issue I'm facing is, if user tries to reload the same page again, the rule is again getting created and Post servlet is getting called again without clicking on Submit button. My Expectation is that when form submit is successfully completed, if a user tries to do a page refresh, then GET method should be invoked(instead of resubmitting the post request)

Can anyone please help me to undertsand this issue and guide on possible resolution? how can one prevent the POST servlet call on Page reload?

0

There are 0 answers