June 17th, 2003, 10:13 PM
Passing a request to another page and displaying the new pages URL
I've got a number of pages on my site that communicate with a database. Everything is working well but I am now trying protect myself from Stupid User Errors.
Specifically when a user performs a database operation and then hits the refresh button repeatedly on the page that did the operation. (SQL Inserts are particularly ugly in this situation)
My problem is that both the data handling and the resulting page rely on information in the request object from the original form.
I've tried processing the information on one page and then sending a redirect but this loses the request object. I've also tried using the forward method but it only displays the result page, it doesn't actually send the user there so refreshes will still mess me up.
What I really want is to do all my SQL operations on one page and then send them to a results page that can be refreshed as many times as they like without corrupting my database.
June 18th, 2003, 04:30 PM
The only way to change the url in the clients address bar is to send a redirect. If you need some info that is lost, you may want to see if you can put it into the session instead.