Hi,
I was trying to serialize an ArrayList
which contains custom objects.
I'm serializing it in a Servlet
(server side), and deserialize at the client side. (using ObjectOutputStream
and ObjectInputStream
)
It worked fine, when I work with ArrayList<String>
.
But when I tried it with ArrayList<MyObject>
I couldn't get any results in the client side, this is the exception:
java.lang.ClassNotFoundException: web.MyObject
Of course I have done this:
public class MyObject implements Serializable { ... }
MyObject
contains only String
fields.
What have I done wrong?
Thanks,
Ray.