One way to do it is declare a variable for a window.
Open that window out of sight.
Give its document.location.href your jsp + plus name,data pairs that you want in your datebase and then close that window after having waited some time.
This is not a very stable approach your user might close the window before it is finished, the server might be slow.
But that is just the way things go with sneaky thing