I want hide(security reason) a group of static PDF in
jetspeed. So I read and write the PDF in jsp. This jsp
page can read and write jsp out side jetspeed. But
after I put it into jetspeed. It give me 'getWriter()
has already been called for this response ' error.
Does any one know how to solve the problem?
Here is my jsp
<%@ page import="java.io.*" %>
<%@ page import="java.net.*" %>
<%
OutputStream o = response.getOutputStream();
response.setContentType("application/pdf");
File f = new File("pdf/test2.pdf");
InputStream is = f.toURL().openStream();
byte[] buf = new byte[32 * 1024];
int nRead = 0;
while( (nRead=is.read(buf)) != -1 ) {
o.write(buf, 0, nRead);
}
%>
Thanks a lot
__________________________________
Do you Yahoo!?
Yahoo! Domains � Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]