File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes problems while refreshing page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problems while refreshing page" Watch "problems while refreshing page" New topic

problems while refreshing page

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143

when I access a page that retrieves data from database and displays them in the page, everytime on refresh it will again append to the bottom of the previous data. How can I prevent this happen?

original page:

on refresh:
(data duplicated)

I'm not available, my BF's name is WORK.
Preetha Shenoy

Joined: Nov 18, 2005
Posts: 10
If u r storing the data in an ArrayList, try arrayList.clear() after the
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

Preetha Shenoy, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

Forum Bartender

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: problems while refreshing page
It's not a secret anymore!