Register now or log in to join your professional community.
Yes, You can use both, but make sure the data you are retriving back.
printwriter is being used for char based data outpur like data from database. It is also do a unicode char conversion.
for bit streams like getting images you should use serveroutputstream.