If you remove one element , the vector is resized ,
therefore if you want to remove the elements which are in a sequence ay in
the postions 1 and 2
v.removeElementAt(0);
v.removeElementAt(0);
Only the two elements are removed..
Saravanan
----- Original Message -----
From: hotmail <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 09, 2001 3:50 PM
Subject: remove element frm vector
> hi all,
> i m doin this
>
> <%
> Vector vv=(Vector)session.getAttribute("isin");
> Iterator itr=vv.iterator();
> Vector vv1=(Vector)session.getAttribute("name");
> Iterator itr1=vv1.iterator();
>
> if(request.getParameter("act") != null)
> {
> String isin_no=request.getParameter("in");
> String nm=request.getParameter("nm");
> vv.removeElement(isin_no);
> vv1.removeElement(nm);
> }
> %>
>
> but it is hangin w/o givin errors...
> any help?
> thx
> MJ
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets