>I am now using Tomcat 6 developing web application,
That serves a site on the internet?
>I have a problem that user can download PDF files from the web and the
>file was created by programme, and it may cost a lot time.
>So, I want to know that how can I know that the connection from client
>was available ?
I do not quite understand. If the user is 'at the site' and
clicks the 'download big PDF' link I think it is pretty obvious
they not only have an internet connection, but are currently
'connected and ready to receive data'.
The connection might be lost 90% of the way through
the download (e.g. when someone trips over the computer
power cable, and rips it from the wall), but there is nothing
you can do about that.
If it is such a big and important document, you might offer
a simple download manager for it, perhaps launched using
Java Web Start.

Signature
Andrew Thompson
http://www.athompson.info/andrew/