Skip to Content
avatar image
Former Member

Request character encoding.


I need to know how can I change the character encoding of request to other then default.

For example I want it be a "UTF-8", but the default is "US-ASCII".

I tried to change it via the "config tool" (Alone->services->http->Encoding), did a restart to a SAP_J2EE server, but when I look in the debugger the instance of HttpServletRequest still has it's

characterEncoding property set to null (default).

Any ideas how to make it happen?

Thanks in advance.

Maxim Avezbakiev.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 15, 2003 at 05:11 PM

    Hello Maxim,

    you have to do this on a servlet by servlet or JSP by JSP basis.

    For example in a servlet you would set prior to the beginning of the body the statement request.setCharacterEncofing("...utf8").

    If it is a JSP you set the charset in the page directive. For more information on this topic please refere to

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      Thank you for your reply.

      I already found a more general solution -- and it is use of the Filters that were introduce in Servlet 2.3.

      In a few words -- the custom filter will be invoked before the request will parse any parameters and there you can call for a request.setCharacterEncoding() method.