The problem here is that you want to send the data to page2.jsp by submitting the form, whereas you can only remove the menus etc using the javascript 'window.open()' function.
All is not lost, you can submit to a page, have that page gather the data and call window.open and pass on the data in the url then close itself.
Again we run into the problem that you are doing this to stop the user from using the buttons, and in reality you can't. You can remove the back button but you can't stop someone from pressing 'alt-back arrow'. You can remove the refresh button but you can't disable 'control-R'.
It sounds like what you are trying to achieve is stopping users from reloading a page that is the result of a submitted form. When they do this, it resubmits the form and you get duplicated data.
The way I normally manage this is to have page1.jsp submit to a
Servlet, the Servlet processes the data then does a response.sendRedirect to the confirmation page. If they reload, they simply reload the confirmation page withour breaking anything else.
Dave