This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
when i am creating a record like inserting a record then if i refresh a page same record get inserted again . I am auto incrementing Emp Id. which is a primary key. but other than that everything else is duplicating.
When you are refreshing a page the http event like "/addemployee.do" (assuming struts flow) is getting fired again as before refreshing the page the url which made employee record insertion before page refresh is still there in browsers address bar.There couldn't be new entry if you were editing existing field , I mean "/editemployee.do" kinda functionality. Whatever happening is quiet natural only instead of you clicking on "submit" button and in turn it resulting into corresponding action(in this case /addemployee.do)browser directly firing this http event. But why do you need to refresh your pade anyway?