jsr369-experts@servlet-spec.java.net

[jsr369-experts] request character encoding in web.xml (SERVLET_SPEC-161)

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Thu, 9 Mar 2017 11:43:19 -0800

In our previous discussion of https://java.net/jira/browse/SERVLET_SPEC-161
("Allow encoding to be set from deployment descriptor and API”), we decide to the following:

a) add #get/setRequestCharacterEncoding and #get/setResponseCharacterEncoding in ServletContext
b) add <request-encoding>, <response-encoding> in web.xml

Note that we have get/setCharacterEncoding in ServletRequest/ServletResponse, etc.
In other words, we have “characterEncoding” rather than just “Encoding" in our API.
If that is the case, then it is better to rename the new xml elements in web.xml as follows:
        <request-character-encoding>
        <response-character-encoding>

Please let me know if you have any opinion.
Thanks.
      Shing Wai Chan