Jetty
  1. Jetty
  2. JETTY-756

JSP tag using ternary operator appears to mandate spaces between expression

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.1.12.rc3
    • Fix Version/s: 8.0.0.M0
    • Component/s: JSP
    • Labels:
      None
    • Environment:
      Eclipse 3.4, Maven 2.0.9, maven-jetty-plugin 6.0.12.rc12
    • Number of attachments :
      0

      Description

      This ones a bit annoying, but hopefully easy to fix. While testing the migration from an Eclipse+Ant+Tomcat5.5 environment to doing a (side-by-side) Eclipse+Maven+JettyPlugin I've run across what appears to be an "AnalSpec" problem. It appears Jetty and it's shipped jasper compiler seems to mandate spaces inside some of the tag definitions.

      So this doesn't work:

      <c:set var="href" value="$

      {(empty href)?'#':href}

      "/>

      But this does:

      <c:set var="href" value="$

      {(empty href) ? '#' : href}

      "/>

      All 3 spots must have spaces for this to work.

      Doing some browsing, it appears Tomcat 6.x initially had this problem too:

      http://issues.apache.org/bugzilla/show_bug.cgi?id=42565

      While the workaround on a tag by tag basis is reasonably trivial, it's a bit of a PITA for a lot of tags like what we have.

      So happy to leave the bug as minor but if there was a "PITA" field in JIRA I'd mark it as "haemorrhoid" level.

        Activity

        Hide
        David Yu added a comment -

        Actually the jasper module that jetty6 imports is from glassfish v2 already. (w/c contains the fix for this on the next upcoming release)

        Show
        David Yu added a comment - Actually the jasper module that jetty6 imports is from glassfish v2 already. (w/c contains the fix for this on the next upcoming release)
        Hide
        Jan Bartel added a comment -

        To paraphrase, glassfish has the fix in trunk and we're waiting for a relase, which will be the v2 series.

        Jan

        Show
        Jan Bartel added a comment - To paraphrase, glassfish has the fix in trunk and we're waiting for a relase, which will be the v2 series. Jan
        Hide
        Jan Bartel added a comment -

        Paul,

        It seems sun will not release this fix with the v2 series. However there is a chance that you might be able to drop in the el jars from v3 and it might work. I have asked for clarification from the glassfish project of which releases and jars this fix is actually in, as it is not obvious from their svn commits.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Paul, It seems sun will not release this fix with the v2 series. However there is a chance that you might be able to drop in the el jars from v3 and it might work. I have asked for clarification from the glassfish project of which releases and jars this fix is actually in, as it is not obvious from their svn commits. cheers Jan
        Hide
        Paul Smith added a comment -

        Sounds like the usual from Sun..

        We have managed to work around this by just doing an complex regular expression search and replace. Be nice to fix this (not that you have to, Sun has to release this) because it's these sorts of subtle differences in implementations of the spec between, say, Jetty and Tomcat that make all our lives.. fun..

        thanks heaps for following up!

        Show
        Paul Smith added a comment - Sounds like the usual from Sun.. We have managed to work around this by just doing an complex regular expression search and replace. Be nice to fix this (not that you have to, Sun has to release this) because it's these sorts of subtle differences in implementations of the spec between, say, Jetty and Tomcat that make all our lives.. fun.. thanks heaps for following up!
        Hide
        Jan Bartel added a comment -

        Paul,

        Jetty-8 now uses glassfish v3's implementation of the uel (its version 2.2, along with jsp 2.2). So that should have the fix for this issue in it. Unfortunately I haven't been able to ascertain if this fix is in a glassfish v2 release. I'm going to close this issue for now, but if you find out that this has been included in a glassfish v2 release, please reopen and let me know the release number so we can update the version of jsp used in jetty < 8.

        thanks,
        Jan

        Show
        Jan Bartel added a comment - Paul, Jetty-8 now uses glassfish v3's implementation of the uel (its version 2.2, along with jsp 2.2). So that should have the fix for this issue in it. Unfortunately I haven't been able to ascertain if this fix is in a glassfish v2 release. I'm going to close this issue for now, but if you find out that this has been included in a glassfish v2 release, please reopen and let me know the release number so we can update the version of jsp used in jetty < 8. thanks, Jan

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Paul Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: