AppFuse
  1. AppFuse
  2. APF-1037

Blank Page when providing a base expression in a JSP

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1.0-M2
    • Component/s: Web - General, Web - Struts
    • Labels:
      None

      Description

      Issue
      If you trigger an expression lookup on an object that exists, but get it looking for a method which doesn't, you will end up with a blank screen and nothing in the logs – at best you have to figure out what you last changed in the JSP/Velocity file, at worst you have to go through it line-by-line to find the problem.

      I suspect this might be specific to WebWork/Struts but it could be deeper, my stacks point to org.apache.jasper.runtime.PageContextImpl.evaluateExpression() on line 984. What strikes me as odd is that when downloading the source for Apache Tomcat v4.1, v5.5 and v6.0, none of the PageContextImpl.java files have more than 940 lines in them! I must be looking at the wrong file.

      Replication

      1. Setup a simple Struts based AppFuse site
      2. Create/find an action which has an object (for me this was a List<Customer>)
      3. Add the following (or similar) to the result JSP: <c:out value="$ {customers.kaboom}

        "/> (customers must be an object, and kaboom can't exist)

      4. Run the action and you should end up with a white screen and nothing in the logs

      Solution
      Good question ... I'm happy to help if someone can give me some pointers as I'm stuck at this point.

      Ideas?

        Activity

        Hide
        Matt Raible added a comment -

        I was able to reproduce this problem, but have no idea how to fix it. Struts 2 is pretty bad at reporting error messages when you fat-finger something.

        http://raibledesigns.com/rd/entry/does_struts_2_suck

        Your best bet might be to stick with Struts Tags instead of JSTL.

        Show
        Matt Raible added a comment - I was able to reproduce this problem, but have no idea how to fix it. Struts 2 is pretty bad at reporting error messages when you fat-finger something. http://raibledesigns.com/rd/entry/does_struts_2_suck Your best bet might be to stick with Struts Tags instead of JSTL.
        Hide
        Mike Wille added a comment -

        I have the same issue, but I am using WebMVC and not Struts. So it appears that it is related to JSTL?

        Show
        Mike Wille added a comment - I have the same issue, but I am using WebMVC and not Struts. So it appears that it is related to JSTL?
        Hide
        Mike Wille added a comment -

        Searching further on this, I found a mailing list message, which you likely have already seen:

        http://markmail.org/message/xyt5grivwhs7pazs

        As in the message, disabling the gzip filter worked! Matt, you may want to disable gzip by default for new projects and let people turn it on. After all, the performance gain for local use isn't noticeable.

        Show
        Mike Wille added a comment - Searching further on this, I found a mailing list message, which you likely have already seen: http://markmail.org/message/xyt5grivwhs7pazs As in the message, disabling the gzip filter worked! Matt, you may want to disable gzip by default for new projects and let people turn it on. After all, the performance gain for local use isn't noticeable.
        Hide
        Matt Raible added a comment -

        Resolved by commenting out GZipFilter in web.xml for all web frameworks.

        Show
        Matt Raible added a comment - Resolved by commenting out GZipFilter in web.xml for all web frameworks.
        Hide
        Dan Hardiker added a comment -

        Good to see this issue finally kick the can!

        Show
        Dan Hardiker added a comment - Good to see this issue finally kick the can!

          People

          • Assignee:
            Matt Raible
            Reporter:
            Dan Hardiker
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development