Re: Tomcat download stream gets broken

2011-05-20 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rob, On 5/19/2011 12:29 PM, Rob GB wrote: Someone suggested commons IO could provide some cool stream APIs, I'll try all recommendations, including asynchronous writes. Why not just let the DefaulsServlet serve the

Re: Tomcat download stream gets broken

2011-05-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/20/2011 3:05 AM, André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rob, On 5/19/2011 12:29 PM, Rob GB wrote: Someone suggested commons IO could provide some cool stream APIs, I'll try

Re: Tomcat download stream gets broken

2011-05-20 Thread Pid
) at org.apache.coyote.Response.doWrite(Response.java:560)at org.apache.ca talina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)... 23 more Date: Thu, 19 May 2011 18:03:39 +0200 From: a...@ice-sa.com To: users@tomcat.apache.org Subject: Re: Tomcat download stream gets broken Rob

Tomcat download stream gets broken

2011-05-19 Thread Rob GB
Hi all, I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {byte buf[] = new byte[1024 * 4]; try {File file = new File(realFilename);int size =

Re: Tomcat download stream gets broken

2011-05-19 Thread Pid
On 19/05/2011 11:44, Rob GB wrote: Hi all, I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {byte buf[] = new byte[1024 * 4]; try {File file = new

RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
No-one is going to read all that unformatted code. Try again. p ok, trying again, it looks formatted in hotmail editor: I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {

RE: Tomcat download stream gets broken

2011-05-19 Thread Caldarale, Charles R
From: Rob GB [mailto:rob_gar_...@hotmail.com] Subject: RE: Tomcat download stream gets broken ok, trying again, it looks formatted in hotmail editor: Try using a real e-mail client. This is what it looks like to the rest of the world: http://marc.info/?l=tomcat-userm=130581549006975w=2

Tomcat download stream gets broken

2011-05-19 Thread Gerardo Corro
Trying gmail Hi all, I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { byte buf[] = new byte[1024 * 4]; try { File file = new File(realFilename);

Re: Tomcat download stream gets broken

2011-05-19 Thread André Warnier
Rob GB wrote: No-one is going to read all that unformatted code. Try again. p ok, trying again, it looks formatted in hotmail editor: Get a better email program, cause it ain't formatted here. Are you trying to send this as html by any chance ? If yes, then try as plain text if your email

RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
)        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)        ... 23 more Date: Thu, 19 May 2011 18:03:39 +0200 From: a...@ice-sa.com To: users@tomcat.apache.org Subject: Re: Tomcat download stream gets broken Rob GB wrote: No-one is going to read all that unformatted code. Try again. p ok

Re: Tomcat download stream gets broken

2011-05-19 Thread Filip Hanik - Dev Lists
Looks like the client disconnected, that is a fairly normal scenario. You have to be able to handle the error if a client disconnects prior to having downloaded all the content Filip On 5/19/2011 8:46 AM, Gerardo Corro wrote: Trying gmail Hi all, I have a file download servlet running on

Re: Tomcat download stream gets broken

2011-05-19 Thread André Warnier
Gerardo Corro wrote: Trying gmail That works. Of course, you're going to expect people here to look at 50 lines of code. Oh well.. Hi all, I have a file download servlet running on Tomcat, the code is ... However once in a while I get an error that prevents files from being

Re: Tomcat download stream gets broken

2011-05-19 Thread André Warnier
André Warnier wrote: Gerardo Corro wrote: Trying gmail That works. Of course, you're going to expect people here to look at 50 lines of code. Oh well.. Hi all, I have a file download servlet running on Tomcat, the code is ... However once in a while I get an error that prevents

RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
: Re: Tomcat download stream gets broken André Warnier wrote: Gerardo Corro wrote: Trying gmail That works. Of course, you're going to expect people here to look at 50 lines of code. Oh well.. Hi all, I have a file download servlet running on Tomcat, the code

Re: Tomcat download stream gets broken

2011-05-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rob, *sigh* We'll argue about this all week if someone doesn't just reformat your code and go for it. Evidently, I've got nothing better to do. On 5/19/2011 6:44 AM, Rob GB wrote: public void service(HttpServletRequest request,

Re: Tomcat download stream gets broken

2011-05-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rob, On 5/19/2011 12:29 PM, Rob GB wrote: Someone suggested commons IO could provide some cool stream APIs, I'll try all recommendations, including asynchronous writes. Why not just let the DefaulsServlet serve the files? - -chris -BEGIN PGP