the vector contains Mythread because i've done the following:

for(int x=0;x<threadList.size();x++)
{
    Object o=threadList.elementAt(x);
    out.writeln(o.getClass().getName());
}

and it prints that the objects are of type MyThread

i've posted this question because it seems so simple that i though that
maybe there's a bug in the Application object

fabrice

-----Original Message-----
From: Christopher Cobb <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, April 28, 1999 2:14 PM
Subject: Re: question on Application


>Fabrice Sarciaux wrote:
>
>> Vector threadList=(Vector)Application.getAttribute("ThreadList");
>>
>> for(int x=0;x<threadList;x++)
>> {
>>     MyThread t=(MyThread)threadList.elementAt(x);
>>     ....
>> }
>>
>> i get a ClassCastException when trying to cast the object of the vector
into
>> a MyThread object
>
>My guess is that the vector contains Threads instead of MyThreads.  Print
t.toString() to see what you've really got.
>
>cc
>
>P.S. BTW, this question would probably be more appropriate for a java
programming news group than a JSP news group.
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to