java - How to figure out if javax.servlet successfully sends the response -


i'm using jetty server handle http requests. know if there way can check if response sent client. there error code or status can check, or exception can catch if transfer client failed reason?

thanks

is there error code or status can check, or exception can catch if transfer client failed reason?

it sounds want server able know if response delivered client.

the simple answer there isn't way know this. tcp/ip doesn't support this, http not support this, , servlet apis don't support this.

in circumstances, exception may throw if server notices client has closed connection early. there no guarantees notice, or result in exception visible application servlet code. indeed quite close won't noticed (if @ all) until after servlet call has returned.


if want implement kind of "response delivered" acknowledgement web pages, could embed "onload" javascript in webpage sends ajax request server. have consider case user has disabled javascript, or original request made non-browser application.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -