how can a servlet automatically updated by its data without refreshing?
This question suggests to me that you don't fully understand the role of a servlet... a servlet generates a one-off response when requested. It doesn't maintain a persistent connection with the client and therefore keep feeding data back*... It is much more like a buffer which builds a response and then sends it all back at once.
A servlet typically gathers the data it needs only when it has to service a response using that data. It shouldn't be 'refreshed' every time that data changes (this is grossly inefficient anyway in the case where you have more refreshes than requests!). If you are maintaining persistent database connections in your servlet, that's fine, but it should only be necessary to check for new data each time the servlet is invoked by a client request.
The only way to force a client page to refresh is to use client-side scripting like JavaScript - and if it's only certain data you need to refresh on the page, then AJAX might be the answer.
* Note that this statement is distinct from saying the container may keep an HTTP session with the client; that's a different story. But HTTP is still stateless (no permanent connections unlike FTP or TCP).
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )