You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by alan leung <ch...@yahoo.com> on 2001/04/24 01:12:34 UTC
Servlet --> File --> Web-browser
Hi,
I have a servlet reads a file from FileInputStream and
copy those bytes to ServletOutputStream and send back
to web browser.
But if user click CANCEL while downloading in
netscape. i will get an exception in doGet method. -->
IOException in doGet(): java.net.SocketException:
Connection aborted by peer: socket write error
if user click CANCEL in IE (Internet Explorer). i
didn't get any exception print out.
Both cases is browser connect to servlet engine
directly (tomcat)
if browser connects to apache server --> then tomcat;
no exception got caught for netscape and IE if user
click CANCEL while download.
What i think is clicking CANCEL while downloading a
file would lost the TCP connection without ending it.
which would always rise an IOException right? Why if
i use apache server w/ tomcat or IE connect to tomcat
directly won't cause IOException in doGet() method?
thanks.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Re: Servlet --> File --> Web-browser
Posted by alan leung <ch...@yahoo.com>.
can any one helps me out?
thanks again.
--- alan leung <ch...@yahoo.com> wrote:
> Hi,
> I have a servlet reads a file from FileInputStream
> and
> copy those bytes to ServletOutputStream and send
> back
> to web browser.
>
> But if user click CANCEL while downloading in
> netscape. i will get an exception in doGet method.
> -->
> IOException in doGet(): java.net.SocketException:
> Connection aborted by peer: socket write error
>
> if user click CANCEL in IE (Internet Explorer). i
> didn't get any exception print out.
>
> Both cases is browser connect to servlet engine
> directly (tomcat)
>
> if browser connects to apache server --> then
> tomcat;
> no exception got caught for netscape and IE if user
> click CANCEL while download.
>
> What i think is clicking CANCEL while downloading a
> file would lost the TCP connection without ending
> it.
> which would always rise an IOException right? Why
> if
> i use apache server w/ tomcat or IE connect to
> tomcat
> directly won't cause IOException in doGet() method?
>
> thanks.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Re: Servlet --> File --> Web-browser
Posted by alan leung <ch...@yahoo.com>.
can any one helps me out?
thanks again.
--- alan leung <ch...@yahoo.com> wrote:
> Hi,
> I have a servlet reads a file from FileInputStream
> and
> copy those bytes to ServletOutputStream and send
> back
> to web browser.
>
> But if user click CANCEL while downloading in
> netscape. i will get an exception in doGet method.
> -->
> IOException in doGet(): java.net.SocketException:
> Connection aborted by peer: socket write error
>
> if user click CANCEL in IE (Internet Explorer). i
> didn't get any exception print out.
>
> Both cases is browser connect to servlet engine
> directly (tomcat)
>
> if browser connects to apache server --> then
> tomcat;
> no exception got caught for netscape and IE if user
> click CANCEL while download.
>
> What i think is clicking CANCEL while downloading a
> file would lost the TCP connection without ending
> it.
> which would always rise an IOException right? Why
> if
> i use apache server w/ tomcat or IE connect to
> tomcat
> directly won't cause IOException in doGet() method?
>
> thanks.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Re: Servlet --> File --> Web-browser
Posted by alan leung <ch...@yahoo.com>.
can any one helps me out?
thanks again.
--- alan leung <ch...@yahoo.com> wrote:
> Hi,
> I have a servlet reads a file from FileInputStream
> and
> copy those bytes to ServletOutputStream and send
> back
> to web browser.
>
> But if user click CANCEL while downloading in
> netscape. i will get an exception in doGet method.
> -->
> IOException in doGet(): java.net.SocketException:
> Connection aborted by peer: socket write error
>
> if user click CANCEL in IE (Internet Explorer). i
> didn't get any exception print out.
>
> Both cases is browser connect to servlet engine
> directly (tomcat)
>
> if browser connects to apache server --> then
> tomcat;
> no exception got caught for netscape and IE if user
> click CANCEL while download.
>
> What i think is clicking CANCEL while downloading a
> file would lost the TCP connection without ending
> it.
> which would always rise an IOException right? Why
> if
> i use apache server w/ tomcat or IE connect to
> tomcat
> directly won't cause IOException in doGet() method?
>
> thanks.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/