hi ppl,
i am working on a application based on the
struts architecture. every relevent action on a page does its processing thru the controller
servlet and action class and the controller servlet then forwards the result to the result
jsp using the requestdispatcher method.
due to this i am facing a problem in pages where i am inserting a row in the database when ever i refresh a page just after i have inserted a row in the database a duplicate row is inserted due to obvious reasons being the url still being the one which did the insert action in the first case coz of the requestdispatcher .....
now the solution to the prob is if i can differentiate between a post action thru submit on a page and a post action coz of refresh i will be able to prevent the unwanted results...and the problem lies here i just cannot think or come up with a way where in i can kno if the post was due to a submit or refresh .......
i kno this sounds very trivial or maybe not but i need to kno of something which will help me differentiate this at the controller servlet level so that i can then do the subsequent procesing accordingly...
thanking u all in advance ...
ps: i kno of a technique which checks for the header content but it works only in I.E but fails in netscape pls can somebody suggest a cross browser compatable solution to this.....