Your both assumptions are wrong.
1) No one can disable browser back button (of course excluding the vendors :)).
2) Java plays on server side. Javascript plays on client side.
You might want browser onunload
function to prompt user.
@Derek did a demo for what I mean : http://jsfiddle.net/DerekL/LZCj7/show/
19
solved Is there any way to disable browser back button using java code [closed]