This causes the page to make a request for the new page on the same host because I left off the protocol and host name. Used this way it should function identically to a clicked link on a page.
location = "newPage.jsp";
I have to admit I have never used location.replace. replace is specifically used to replace a page in the users history, making navigating back to the page by using the back button impossible. Not having used it, I cannot say if there would be some quirk with it I am not aware of.
EDIT: just for kicks, replace the button with a link that goes to the same page and see if you still have your problem.
EDIT2: Also, I believe that encoding the session ID in the url only works if the servers session handler has URL Rewriting turned on, which I don't think most do by default. This is in reference to something that was posted ont he other MB.