Shinya said:
Is it possible to send a unicode document
from servlet to the browser and the browser can
tell what kinda of language this document is written?
That is the purpose of the "charset=" clause in an HTTP "Content-type:"
header. There are various ways to put such a header into your response,
but this is probably the easiest:
(in servlet code
response.setContentType("text/html; charset=UTF-8");
You do that before starting to write the actual response text. You then
ensure that you actually do encode the text in UTF-8, either by getting
and using the response's Writer, or by wrapping the response's
OutputStream in an OutputStreamWriter configured to use UTF-8.