|
Hi,
The following simple code does not seem to work
with Tomcat 4.0beta1. I just try to send a serialized object followed by some
bytes. It works fine with Tomcat 3.1.1, Tomcat 3.2.1, Resin 1.2, Resin 1.3 and
WebLogic 5.1 ... Anyone has a clue ?
-------
try
{
OutputStream os = theResponse.getOutputStream();
//
Write back the result object as a serialized
object
ObjectOutputStream oos = new ObjectOutputStream(os); oos.writeObject(result); oos.flush(); // ...
and write back the content from the method under test
(i.e.
// that's everything the method under test has written on the // servlet output stream). os.write(wrappedResponse.getData());
oos.close();
} catch
(IOException e) {
-------
When ran, I get an exception on the server side saying "connection reset by
peer", and on the client side it says "cannot read serialized object".
The code on the client side is :
connection.connect();
ObjectInputStream ois = new
ObjectInputStream(connection.getInputStream());
result = (ServletTestResult)ois.readObject(); Thanks a lot for any hint...
Vincent Massol.
|
- Re: Tomcat 4.0 ServletOutputStream and Serialized object pr... Vincent Massol
- Re: Tomcat 4.0 ServletOutputStream and Serialized obje... Remy Maucherat
