However, whenever the user presses the Refresh icon from the toolbar or does a right-click + refresh, it calls the action which inserts a new record in the DB. We want this not to happen i.e. whenever refresh is called, the action should not be performed.
Basically when your servlet finishes the action to insert the record to the DB, you redirect to the result page rather than forward to it.
That creates a new request.
If they then refresh that page, they just refresh the "get" part, not the save.