[S2] ClientAbortException in StreamResult

2009-07-01 Thread Pro1712

Hello!

I've got a Action to download documents stored in a BLOB ind an oracle-db:
action name=DownloadDocumentAction method=downloadDocument
class=com.foo.FileAction
result type=stream
inputStream
/result
/action

public String downloadDocument()
{
inputStream_ = downloadFromDB(...);
return success;
}

public InputStream getInputStream()
{
return inputStream_;
}


This works as ecpected when donwloading with one thread.

When I use a download manager like DownThemAll in FF using more than one
thread, I get a ClientAbortException in StreamResult when the document is
written to the response-output. (File StreamResult.java line 265).
The first thread is processed correctly but all subsequent threads get the
exception.

Why do I get this exception?
Every thread calls the action, gets the file from the database and then the
file is written to to output.

By the way:
Is it possible to cache the file?
It's not very clever to get the file from the database for every thread...

Thanks for your help!

-- 
View this message in context: 
http://www.nabble.com/-S2--ClientAbortException-in-StreamResult-tp24288268p24288268.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: ClientAbortException

2006-10-10 Thread B . Sridhar

Sorry, for my unlcear question. Actually it was a part of my question which
I posted earlier.  I am writing a struts appliction  to download a file that
is on the server. When the user clicks the download button, its displaying
the open,save cancel window. Everything is working fine for files of small
sizes ie. less than 50 kb..but if the file size is more and when I click
cancel  its displaying a ClientAbort Exception.

The Exception is..

ClientAbortException: java.net.SocketException: Connection reset by peer:
socket write error
Oct 9, 2006 11:08:25 AM org.apache.struts.action

   .RequestProcessor processException
   WARNING: Unhandled Exception thrown: class
org.apache.catalina.connector.ClientAbortException

Even I am trying to catch this exception by adding
ClientAbortException,(which I got it by adding the catalina jar file from
tomcat/server directory to my eclipse lib folder)  but still I am getting
the above exception.  Please help me

On 10/9/06, Dave Newton  [EMAIL PROTECTED] wrote:


 From: B.Sridhar [mailto: [EMAIL PROTECTED]
 How to catch ClientAbortException, when I am adding the following line
it
 showing error. Its not identifying the org.apache.catalina, do I need
to
 add any jar files to my path to identify this exception  Please
respond..

 *org.apache.catalina.connector.ClientAbortException

See, here's the thing:

1) Added *what* following line?
2) Showing *what* error?
3) *What* is showing the error?

Now, I'm just guessing, but I'd say that you do not have Eclipse set up
properly and it does not have access to the Tomcat JARs with this
exception.

http://catb.org/~esr/faqs/smart-questions.html
http://catb.org/%7Eesr/faqs/smart-questions.html

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
B.Sridhar


Re: ClientAbortException..urgent

2006-10-10 Thread James Mitchell
That's not really specific to file size, or even Java in general.   
The root of this exception stems from the lifecycle of an http request.


When a browser makes a request, the connection is maintained until  
the server completes the bytes it told the browser it was going to  
send.  If you hit stop on *any* request before it is finished, you  
may or may not see this exception in the logs.


To summarize, I wouldn't worry too much about this, there's nothing  
you can do to prevent it, that's just one of the quirks with web  
servers and clients.




--
James Mitchell
678.910.8017




On Oct 10, 2006, at 1:49 AM, B.Sridhar wrote:


Hi

I am writing a struts appliction  to download a file that is on the  
server.

When the user clicks the download button, its displaying the open,save
cancel window. Everything is working fine for files of small sizes  
ie. less

than 50 kb..but if the file size is mor and when I click cancel  its
displaying a ClientAbort Exception.

ClientAbortException: java.net.SocketException: Connection reset by  
peer:

socket write error
Oct 9, 2006 11:08:25 AM org.apache.struts.action


.RequestProcessor processException
WARNING: Unhandled Exception thrown: class
org.apache.catalina.connector.ClientAbortException


Please help me how to avoid this situation.




--
B.Sridhar



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ClientAbortException

2006-10-09 Thread B . Sridhar

Hi

I am writing a struts appliction a to download a file that is on the server.
When the user clicks the download button, its displaying the open,save
cancel window. Open and save are working fine, but while downloading a word
doc or pdf, when the user clicks cancel, its displaying a ClientAbort
Exception.

ClientAbortException: java.net.SocketException: Connection reset by peer:
socket write error
Oct 9, 2006 11:08:25 AM
org.apache.struts.action.RequestProcessorprocessException
WARNING: Unhandled Exception thrown: class
org.apache.catalina.connector.ClientAbortException

While downloading a image, if user clicks cancel, its working fine.
Please help me how to avoid this situation.
--
B.Sridhar


Re: ClientAbortException

2006-10-09 Thread Mikolaj Rydzewski

B.Sridhar wrote:
I am writing a struts appliction a to download a file that is on the 
server.

When the user clicks the download button, its displaying the open,save
cancel window. Open and save are working fine, but while downloading a 
word

doc or pdf, when the user clicks cancel, its displaying a ClientAbort
Exception.

Does this happen only with IE?

Add Pragma: cache header to response. Should help.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Re: ClientAbortException

2006-10-09 Thread B . Sridhar

HI,
 I tried with your suggestion, but of no use..kindly suggest me the
solution

On 10/9/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:


B.Sridhar wrote:
 I am writing a struts appliction a to download a file that is on the
 server.
 When the user clicks the download button, its displaying the open,save
 cancel window. Open and save are working fine, but while downloading a
 word
 doc or pdf, when the user clicks cancel, its displaying a ClientAbort
 Exception.
Does this happen only with IE?

Add Pragma: cache header to response. Should help.

--
Mikolaj Rydzewski [EMAIL PROTECTED]







--
B.Sridhar


RE: ClientAbortException

2006-10-09 Thread Dave Newton
Have you tried catching the exception in the Action that's downloading
the file?

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in email?

Dave

 -Original Message-
 From: B.Sridhar [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 09, 2006 8:45 AM
 To: Struts Users Mailing List
 Subject: Re: ClientAbortException
 
 HI,
   I tried with your suggestion, but of no use..kindly suggest me the
 solution
 
 On 10/9/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:
 
  B.Sridhar wrote:
   I am writing a struts appliction a to download a file that is on
the
   server.
   When the user clicks the download button, its displaying the
open,save
   cancel window. Open and save are working fine, but while
downloading a
   word
   doc or pdf, when the user clicks cancel, its displaying a
ClientAbort
   Exception.
  Does this happen only with IE?
 
  Add Pragma: cache header to response. Should help.
 
  --
  Mikolaj Rydzewski [EMAIL PROTECTED]
 
 
 
 
 
 
 --
 B.Sridhar

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ClientAbortException

2006-10-09 Thread B . Sridhar

HI,

How to catch ClientAbortException, when I am adding the following line it
showing error. Its not identifying the org.apache.catalina, do I need to add
any jar files to my path to identify this exception  Please respond..

*org.apache.catalina.connector.ClientAbortException


*


--
B.Sridhar


RE: ClientAbortException

2006-10-09 Thread Dave Newton
 From: B.Sridhar [mailto:[EMAIL PROTECTED]
 How to catch ClientAbortException, when I am adding the following line
it
 showing error. Its not identifying the org.apache.catalina, do I need
to
 add any jar files to my path to identify this exception  Please
respond..
 
 *org.apache.catalina.connector.ClientAbortException

See, here's the thing:

1) Added *what* following line?
2) Showing *what* error?
3) *What* is showing the error?

Now, I'm just guessing, but I'd say that you do not have Eclipse set up
properly and it does not have access to the Tomcat JARs with this
exception.

http://catb.org/~esr/faqs/smart-questions.html

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ClientAbortException..urgent

2006-10-09 Thread B . Sridhar

Hi

I am writing a struts appliction  to download a file that is on the server.
When the user clicks the download button, its displaying the open,save
cancel window. Everything is working fine for files of small sizes ie. less
than 50 kb..but if the file size is mor and when I click cancel  its
displaying a ClientAbort Exception.

ClientAbortException: java.net.SocketException: Connection reset by peer:
socket write error
Oct 9, 2006 11:08:25 AM org.apache.struts.action


.RequestProcessor processException
WARNING: Unhandled Exception thrown: class
org.apache.catalina.connector.ClientAbortException


Please help me how to avoid this situation.




--
B.Sridhar