use the RFC standard.
For example, in my php program (i have not used java to respond to
things on port 80 before, but it should be the same). Set the
content-type header.
--- [ php ] ---
header( "Content-type: ", $mime-type );
--- [ php ] ---
I sugguest you appeand the line "Content-type: " to the HTTP header.