hi all, i'm trying to develop an upload-download application through jsp. its giving me following error while downloading.
it says IllegalStateException. basically IOException. says OutputStream already in use for this request. what i'm doing is when i click on link, it calls a jsp which reads from a file and writes using the printwriter. for doing this let's say image download. i changes the content type of response object to image/gif then i set the content length attribute. then i write the image using printwriter. it gives the above mentioned exception. can ne 1 help me. thanx harish
Originally posted by Harish Kashyap: i'm trying to develop an upload-download application through jsp.
Wrong tool for the job. JSPs are only fit to produce text-based output formats. Use servlets. There's no advantage in using a JSP anyway. You're getting an IllegalStateException because the JSP engine has already obtained a response output stream and wrapped a JspWriter around it. You cannot get a different writer. - Peter