glassfish
  1. glassfish
  2. GLASSFISH-18453

multipart/form-data problem with myfaces extension filter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Works as designed
    • Affects Version/s: 3.1.2_b23
    • Fix Version/s: None
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      glassfish 3.1.2 build 23, jre 7, ubuntu linux

    • Status Whiteboard:
      Hide

      myfaces ExtensionsFilter doesn't work with glassfish 3.1.2. A h:form with multipart/form-data with page encoding utf-8 sets h:inputText with wrong charset. As a result the database is corrupted with unreadable chars and the page is reloaded with strange characters. Also no file is upload by the managed bean. Maybe related with issue GLASSFISH-16740?

      The same application works with glassfish 3.1, 3.0.1

      Show
      myfaces ExtensionsFilter doesn't work with glassfish 3.1.2. A h:form with multipart/form-data with page encoding utf-8 sets h:inputText with wrong charset. As a result the database is corrupted with unreadable chars and the page is reloaded with strange characters. Also no file is upload by the managed bean. Maybe related with issue GLASSFISH-16740 ? The same application works with glassfish 3.1, 3.0.1

      Description

      myfaces ExtensionsFilter doesn't work with glassfish 3.1.2. A h:form with multipart/form-data with page encoding utf-8 sets h:inputText with wrong charset. As a result the database is corrupted with unreadable chars and the page is reloaded with strange characters. Also no file is upload by the managed bean. Maybe related with issue GLASSFISH-16740?

      The same application works with glassfish 3.1, 3.0.1

        Activity

        Hide
        kchung added a comment -
        Show
        kchung added a comment - Oops. I meant http://java.net/jira/browse/GLASSFISH-18516
        Hide
        dani_drio added a comment -

        No, I try the last 4.0 (build 27) and has the same problem.

        Show
        dani_drio added a comment - No, I try the last 4.0 (build 27) and has the same problem.
        Hide
        kchung added a comment -

        Build 27 does not include the fix. Try b30.

        Show
        kchung added a comment - Build 27 does not include the fix. Try b30.
        Hide
        dani_drio added a comment -

        No, b30 does not solve the problem.

        Show
        dani_drio added a comment - No, b30 does not solve the problem.
        Hide
        dani_drio added a comment -

        Causally I found a solution. The problem seems to appear when this combination occurs:

        • the form is multipart
        • the page has a page directive declaring the encoding: <%@page pageEncoding="UTF-8"%>

        The solution is:

        • declare in descriptor glassfish-web.xml the param: <parameter-encoding default-charset="UTF-8"/>
        • remove the page directive in all the jsf pages.

        This solution also removes from the log the typical warning:

        "Unable to set request character encoding to UTF-8 from context xxxx, because request parameters have already been read, or ServletRequest.getReader() has already been called"

        regards.

        Show
        dani_drio added a comment - Causally I found a solution. The problem seems to appear when this combination occurs: the form is multipart the page has a page directive declaring the encoding: <%@page pageEncoding="UTF-8"%> The solution is: declare in descriptor glassfish-web.xml the param: <parameter-encoding default-charset="UTF-8"/> remove the page directive in all the jsf pages. This solution also removes from the log the typical warning: "Unable to set request character encoding to UTF-8 from context xxxx, because request parameters have already been read, or ServletRequest.getReader() has already been called" regards.

          People

          • Assignee:
            Ed Burns
            Reporter:
            dani_drio
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: