title: java servlet : run a method in server when webpage finish onload
body: <p>i want to run a method in servlet  when client finished onload webpage without need to rewrite or reload the current webpage.i try to use javascript onload event, but need to rewrite back the current page.</p>
  
  <p>how to know a request come from web browser beside using user agent.</p>