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
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Nick_72 earned 85 total points
ID: 12275395
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
ID: 12275404
or you could clear the vector at the beginning of the page:

yourVector.clear();
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

626 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