Jump to content

ServletOutputStream


hussainian

Recommended Posts

Hi!

What I'm doing is that in a servlet, converting JasperPrint object into output stream and then calling that servlet in an applet. That applet convert the stream back into JasperPrint and displayes it in applet in the browser. Code of servlet is as follows:

         response.setContentType("application/octet-stream");
         ServletOutputStream ouputStream = response.getOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(ouputStream);
         oos.writeObject(jasperPrint);
         oos.flush();
        oos.close();
        ouputStream.flush();
        ouputStream.close();

The issue is when in the applet, I get it back to JasperPrint using JRLoader.loadObject, I get exception Error Loading Object. Please suggest some solution.

Thanks.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...