Nope, MyObject is not defined as an inner class and is already in a .java
file by itself.

Any more thoughts on this one ?

        -----Original Message-----
        From:   Shahed Ali [SMTP:[EMAIL PROTECTED]]
        Sent:   Monday, February 05, 2001 6:22 PM
        To:     [EMAIL PROTECTED]
        Subject:        Re: ClassCastException

        Are you using an inner class for declaring MyObject ?

        I faced a similar problem when I daclared a class as below in a jsp
page,
        create an object of type ax,
        saved it in a session, and retrived it in another jsp page which had
the
        same <%! class ax ...%>
        code fragment.

        <%!
        class ax
        {
        public int x;
        }
        %>

        The problem is that you cannot cast inner classes as they are
qualified by
        their enclosing class (AFAIK)
        Try moving class MyObject to a seprate .java file.

        Regards
        Shahed


        
---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to