Nov 10, 2018

Solution to Glassfish problem: PWC4011: Unable to set request character encoding to UTF-8 from context

Glassfish defaults response encoding to iso8859-1.

You can change it to UTF-8 by modifying glassfish-web.xml

<glassfish -web-app="-web-app" error-url="">
   <parameter -encoding="-encoding" default-charset="UTF-8"></parameter>
If you cannot find glassfish-web.xml, from NetBeans, you can create this file with: New – Other – GlassFish – GlassFish Descriptor.