There a number of ways around this problem
Session Token
Use a session token to determine if the form that causes the intial submission has already been processed.
Redirect
Use a redirect and not directly forward to the view from the servlet that performed the operation that you don't want to duplicate.
For example: let's say that after you insert the row, you want to display a page that shows the entity represented by that row. In your insertion servlet you would perform the SQL insert operation, but then you would NOT directly foward to the display page. You would redirect to a servlet that would obtain the result of the insertion and then that servlet forwards to the display page.
That way, upon a refresh, all that happens is that the servlet re-obtains the record and displays it. No multiple insertions can occur.