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.
The moose likes Servlets and the fly likes problem with JSP and database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "problem with JSP and database" Watch "problem with JSP and database" New topic

problem with JSP and database

Gurjit Sandhu

Joined: Jan 29, 2009
Posts: 11
Hi All,
I am doing project on intranet mailing system with JSP and servlet and Using MS-Acess as backend. once user is validated he is shown welcome screen and then he goes to inbox, read msg, and reply to it. in reply module proper values are inserted in DataBase. all goes well and reply is sent back to user that his message has been sent successfully.
Problem is that if at that time user presses the refresh screen of browser and sends retry then again database updation is done and same message is sent again means multiple entries in database with same rows.
is there any way to prevent it.
Help please. Thanks for helping in advance.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63202

Please take the time to choose the correct forum for your posts. This forum is for questions on HTML and JavaScript.

For more information, please read this.

This post has been moved to a more appropriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63202

This is typical of poorly structured web applications.

Please see this article for information on properly structuring web apps, paying particular attention to the so-called "PRG pattern".
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: problem with JSP and database
jQuery in Action, 3rd edition