tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject Tomcat 4.0 ServletOutputStream and Serialized object problem
Date Thu, 15 Feb 2001 08:09:38 GMT

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);

            // ... 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).


        } 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 :


        ObjectInputStream ois = new ObjectInputStream(connection.getInputStream());
        result = (ServletTestResult)ois.readObject();

Thanks a lot for any hint...
Vincent Massol.

View raw message