javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-3071

javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL doesn't work at all

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.4
    • Fix Version/s: 2.2.5
    • Component/s: None
    • Labels:
      None
    • Environment:

      GlassFish 4.0

      Description

      javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL in web.xml doesn't work at all with Mojarra 2.2.1 and 2.2.4. I created a very basic test project and ran it on GlassFish 3.1.2.2 with Mojarra 2.1.10 (changed EE version in POM to 6) and it works fine, but using 2.2.1 or 2.2.4 on GlassFish 4.0 (EE version changed to 7) the setter for a text input field is called with an empty string instead of null.

        Issue Links

          Activity

          Hide
          mauromol added a comment -

          Hmm... thank you, I was looking at javax.el:javax.el-api, which does not have version 3.0.1-b05.
          Anyway, if I understand it correctly, there's nothing I can do with such a library update in my web application unless I change Tomcat's own JAR (also Tomcat 8 seems to suffer from this problem). Am I correct?

          Show
          mauromol added a comment - Hmm... thank you, I was looking at javax.el:javax.el-api, which does not have version 3.0.1-b05. Anyway, if I understand it correctly, there's nothing I can do with such a library update in my web application unless I change Tomcat's own JAR (also Tomcat 8 seems to suffer from this problem). Am I correct?
          Hide
          Manfred Riem added a comment -

          Yes Tomcat would have to patch their EL

          Show
          Manfred Riem added a comment - Yes Tomcat would have to patch their EL
          Hide
          mauromol added a comment -

          But I doubt they will ever do, since the did the opposite fix:
          https://issues.apache.org/bugzilla/show_bug.cgi?id=56522
          because of the EL specification has this requirement: EL_SPEC-18
          I'm wondering what was fixed in Glassfish implementation: did they go against the specification?

          Meanwhile, I really need some kind of workaround for my JSF environment. JAVASERVERFACES_SPEC_PUBLIC-1203 mentions an ELResolver... should I add it to my faces.config.xml inside <el-resolver>? I'm already using a SpringBeanFacesELResolver, does this interfere in some way? (I don't know how {{ELResolver}}s are chained...).
          Sorry for asking here, but I already spent a lot of time to try to find out a solution: a converter doesn't do the trick, org.apache.el.parser.COERCE_TO_ZERO=false system property, which is suggested in some StackOverflow questions and blogs, doesn't work in Tomcat 8... I don't know what to do rather than post-process all my beans after a successful submission

          Of course, javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is already set to true in web.xml...

          Show
          mauromol added a comment - But I doubt they will ever do, since the did the opposite fix: https://issues.apache.org/bugzilla/show_bug.cgi?id=56522 because of the EL specification has this requirement: EL_SPEC-18 I'm wondering what was fixed in Glassfish implementation: did they go against the specification? Meanwhile, I really need some kind of workaround for my JSF environment. JAVASERVERFACES_SPEC_PUBLIC-1203 mentions an ELResolver ... should I add it to my faces.config.xml inside <el-resolver> ? I'm already using a SpringBeanFacesELResolver , does this interfere in some way? (I don't know how {{ELResolver}}s are chained...). Sorry for asking here, but I already spent a lot of time to try to find out a solution: a converter doesn't do the trick, org.apache.el.parser.COERCE_TO_ZERO=false system property, which is suggested in some StackOverflow questions and blogs, doesn't work in Tomcat 8... I don't know what to do rather than post-process all my beans after a successful submission Of course, javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL is already set to true in web.xml ...
          Hide
          Manfred Riem added a comment -

          You will have to raise the issue in the EL_SPEC mailing list.

          Yes you can add another ELResolver, but the ordering is dependent on your faces-config.xml and the other JARs included.

          Show
          Manfred Riem added a comment - You will have to raise the issue in the EL_SPEC mailing list. Yes you can add another ELResolver, but the ordering is dependent on your faces-config.xml and the other JARs included.
          Hide
          mauromol added a comment -

          Just for the records, a new issue has been filed for Tomcat too, at least to give the chance to override this via a custom EL resolver.
          https://issues.apache.org/bugzilla/show_bug.cgi?id=57309

          Show
          mauromol added a comment - Just for the records, a new issue has been filed for Tomcat too, at least to give the chance to override this via a custom EL resolver. https://issues.apache.org/bugzilla/show_bug.cgi?id=57309

            People

            • Assignee:
              Manfred Riem
              Reporter:
              kithouna
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: