偶的代码是
response.setContentType("image/gif");
ServletOutputStream sout = response.getOutputStream();
int len;
byte buf[]=new byte[1024];
while ((len=in.read(buf,0,1024))!=-1) {
sout.write(buf,0,len);
但是ServletOutputStream sout = response.getOutputStream();
有问题:getWriter() has already been called for this response
不知道,用JAVA怎么解决~~~~~~~,不用Servlet,可以吗~~~~~~
response.setContentType("image/gif");
ServletOutputStream sout = response.getOutputStream();
int len;
byte buf[]=new byte[1024];
while ((len=in.read(buf,0,1024))!=-1) {
sout.write(buf,0,len);
但是ServletOutputStream sout = response.getOutputStream();
有问题:getWriter() has already been called for this response
不知道,用JAVA怎么解决~~~~~~~,不用Servlet,可以吗~~~~~~
getOutputStream
public ServletOutputStream getOutputStream()
.....
Returns:
....
Throws:
IllegalStateException - if the getWriter method has been called on this response
IOException - if an input or output exception occurred