Does anyone know why request.getQueryString() would return a null, even when I am posting? Here's the deal....I'm trying to prevent my users from posting again using the refresh button on the right click of the mouse button. By getting the query string off of the request, I can determine if the request was already submitted, however I can't seem to get anything but a null using the "request.getQueryString()"? P.S. I'm using J2EE. Version 3.5.3. Thanks!
Since there's no query string on a post (the parameter data is sent as part of the body), it's not surprising you are not getting anything. But backing up a bit, I'm not sure that your technique for detecting multiple posts via refresh is sound. This very topic has been discussed a number of times in the past, and a quick search though this (and perhaps the Servlets forum) will point you in the right direction. bear
So when my user updates an input field and hits the update button, it works fine. However, if they hit the update button, the input fields are disabled on post if the values have not been updated. But let's say they walk away from their computer for just a "second" and come back to hit the refresh button. The data gets submitted again even though no changes have been made. Just out of curiosity, how do you get the parameters from the body of the form or is there a way?
You don't have to worry about how the parameters are passed to the request, the request.getParameter() method hides any differences between get and post operations. With regards to detecting when a post is re-submitted as a result of a refresh, did you look for previous topics on this subject? There's good information for you there. bear
Joined: Jul 03, 2003
Ok, thanks. I will search for topics regarding "when a post is re-submitted as a result of a refresh".