• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

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

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
master_gopi
Asked:
master_gopi
  • 2
1 Solution
 
Nick_72Commented:
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
 
Nick_72Commented:
or you could clear the vector at the beginning of the page:

yourVector.clear();
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now