Solved

i need to print a name ,when ever i refrsh my page i am getting duplicate elements,name appears as amny times i refresh,i am new to jsp please help me,it urgent

Posted on 2004-10-11
4
171 Views
Last Modified: 2010-04-01
i need to print a name on the page ,i am getting it right .when i refresh the page i am getting the name again ,i stored the values in vector and forwarded to other page to print .I am not able to solve the problem even by using sessions to indicate whether the page is displayed or not.please help em it is urgent
0
Comment
Question by:master_gopi
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Nick_72 earned 85 total points
Comment Utility
the simplest solution is to test wheter or not your vector already has that element stored when you add it:

if (yourVector.contains("the name") == false)
  yourVector.add("the name");
0
 
LVL 9

Expert Comment

by:Nick_72
Comment Utility
or you could clear the vector at the beginning of the page:

yourVector.clear();
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now