Servlet send image from server and save in client
Posted
by sangi
on Stack Overflow
See other posts from Stack Overflow
or by sangi
Published on 2010-06-03T13:03:29Z
Indexed on
2010/06/03
14:44 UTC
Read the original article
Hit count: 280
Hi, I'm new and just developing on J2EE. I am modifying an existing application (an OpenSource project). I need to save an image on a client sent by the server, but I do not know how. This activity must be done in a transparent manner without affecting the existing operation of the application.
From the tests done I get this error: java.lang.IllegalStateException: getWriter () has Already Been Called for this response.
How should carry out this task, according to your own opinion? How do I save on the client, locally, the image?
Update:
Thanks for the answers. My problem is that:
- the image is generated on the server, but not for direct client request (there is no link to click on web page), the picture is composed using other services on the Internet.
- reconstruct the image on the server.
- This image must be sent to the client to be saved locally.
- so I'd like it to appear a window where you assign the destination image
- plus I'd like the rest of the application were not affected by this activity.
- The application is yet on production.
Thank you very much for your response.
© Stack Overflow or respective owner