2 Replies Latest reply on Oct 26, 2018 1:16 AM by Jaikiran Pai

    Wildfly14.0.1 BUG: default-encoding setting invalid in Picketlink SSO SP

    cooper lee Newbie

      I use wildfly picketlink SSO in my project, i try any way set  request characterEncoding in my SP project, but is all invalid! form submit data always "ISO-8859-1",  my project in wildfly 10 is Success.

      wildfly configuration 

      <http-listener name="default" socket-binding="http" url-charset="UTF-8" redirect-socket="https" enable-http2="true"/>
      <servlet-container name="default" default-encoding="UTF-8" use-listener-encoding="true">

            i create HttpFilter in my project:


      public void doFilter   (HttpServletRequest request, HttpServletResponse response, HttpSession session, FilterChain chain)
         throws ServletException, IOException
         if (request.getCharacterEncoding() == null) {
        request.setCharacterEncoding("UTF-8");   }
        chain.doFilter(request, response);}


      add  acceptcharset property to form

      <h:form acceptcharset="UTF-8">


      add property to page

          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <f:view contentType="text/html" encoding="UTF-8">
          <f:view contentType="text/html" encoding="UTF-8">


      add wildfly start param and I'm sure file is UTF-8

      -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8  -Dfile.encoding=UTF-8


      but Now I Use Wildfly 10.1.0.Final is Success, request is set to UTF-8 encoding.


      about this problem, I Think Picketlink Handler class in set characterEncoding before use HttpRequest, so I set characterEncoding is invalid!