jQuery in Action, 2nd edition*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60740

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: 60740

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 agree. Here's the link: http://aspose.com/file-tools
subject: problem with JSP and database
Similar Threads
Downloading a multiple file from server
JSP/FORM question
How to get session object by giving Session Id to kill another session in Websphere
Exception: access violation (0xc0000005)
Sharing javascript variables across popups / singleton pattern