What do you get if you do this?
        v.elementAt(i).getClass().getName();

I had a similar problem some time ago, I think I fixed by making the class
I put in the Vector serializable (implement that interface).

[ Matthias Carlsson ]
[ Programmer (Java, XML/XSL, CGI/Perl, HTML/JS) ] [ Web Designer ]
[ E-Mail : [EMAIL PROTECTED] ] [ ICQ: 1430647 ]

> -----Ursprungligt meddelande-----
> Från: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]För Kumar, Amit
> Skickat: den 22 februari 2001 20:00
> Till: [EMAIL PROTECTED]
> Ämne: ClassCastException
>
>
> Hi,
>
> I have a Vector v which contains object People.
> I put this vector into the session in one servlet (s1).
> I am using RequestDispatcher method to call second servlet (s2).
>
> In s2 when I try to get values from the vector I get ClassCastException
> People p = (People)(v.elementAt(i));
>
> Any help would be appreciated.
>
> Thanks
> Amit
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to