If you are using the Pages section of the web.xml editor pane in NetBeans IDE:
Expand the JSP Property Group node.
Enter the page encoding in the Page Encoding field.
If you are editing the web.xml file by hand, add a page-encoding element to the jsp-property-group element in the deployment descriptor and set it to one of the valid character encoding codes, which are the same as those accepted by the pageEncoding attribute of the page directive.
A translation-time error results if you define the page encoding of a JSP page with one value in the JSP configuration element and then give it a different value in a pageEncoding directive.