How are you sending it? If you're serializing, you could be having problems with differing versions of serialization between the client and server.
An IDE is no substitute for an Intelligent Developer.
Joined: Oct 16, 2001
Here is what I am using to send the Vector: URL url = new URL(getDocumentBase(), "../servlet/myservlet.Applet2Servlet?action=selectedClassifications"); URLConnection urlconnection = url.openConnection(); urlconnection.setDoInput(true); urlconnection.setDoOutput(true); urlconnection.setUseCaches(false); urlconnection.setDefaultUseCaches(false); urlconnection.setRequestProperty("Content-Type", "multipart/form-data");//Netscape Bug urlconnection.setAllowUserInteraction(false); ObjectOutputStream objectoutputstream = new ObjectOutputStream(new GZIPOutputStream(urlconnection.getOutputStream())); System.out.println("trying to send"); Vector objs = new Vector(); objs.addElement(selected); objs.addElement(expanded); objectoutputstream.writeObject(objs); objectoutputstream.flush(); objectoutputstream.close();
writeObject is part of the serialization mechanism, so it's likely that your sending serializer is incompatible with your receiving serializer. A better bet is to simply send everything as text:
where convertToObject() is a method you write to undo the "toString" on the sending side (if desired). An industrial-strength version might send the vector size as a number on the first line (preceeding the data lines) so you can optimally preallocate the Vector (or use an Array object, which is faster).
[This message has been edited by Tim Holloway (edited October 17, 2001).]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com