hi
i'm trying to send a picture to the browser but i keep getting this error
public class GetTiff extends HttpServlet
{
protected void doGet(HttpServletRequest req, HttpServletResponse
res)
throws ServletException,IOException
{
res.setContentType("image/jpeg"); // image/jpeg
OutputStream out=res.getOutputStream();
FileInputStream file=new FileInputStream("d:/matrix.jpg");
int databyte;
while((databyte=file.read())>=0)
{ out.write(databyte); }
}
}
here's the error:
java.lang.IllegalStateException: Writer is already being used for this
request
does anyone have a clue how can i fix this problem
thanks for any advice
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]