> 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
Something has a handle to the JSPWriter for the response. Try making a
request to the servlet outside of any JSP functionality.
---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]