If you're using Servlets, need to put this instruccion into the start of any functions that you're using (proccessRequest, doGet or doPost):
request.setCharacterEncoding("UTF-8");