1 Reply Latest reply on Jan 21, 2010 2:26 PM by jorg1

    Accessing request parameter in SeamFilter changes encoding

    jorg1

      I have defined a filter:




      @Name("simpleFilter")
      @Filter(around = {"org.jboss.seam.web.ajax4jsfFilter" })
      @Scope(ScopeType.APPLICATION)
      @Startup
      @BypassInterceptors
      public class SimpleFilter extends AbstractFilter{
      
      public void doFilter(ServletRequest request, ServletResponse resp, FilterChain chain)
           throws IOException, ServletException
          {
           {
                                     String s=request.getParameter("parameter_name");
                     // dosomething
                     chain.doFilter(request, resp);
           }
          }
      
      }





      This filter has the strange sideeffect, that danish national characters edited in textfields and used as reguest parameters are encoding incorrectly.


      I.e. the encoded parameter is incorrect both in textfield and the URL after the request has been committed. However, if I remove the code accessing the requestPrameter:




      String s = request.getParameter("paramter_name");






      the request is encoded correctly.


      Does anyone have an explanation and a way to bypass this behaviour ?