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
185 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fisheye tool 2 125
console vs log file 16 85
how to add new optional parameter to JSP 1 61
maven not picking latest jar instead picking old jar from .m2 12 75
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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