aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60050

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

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