Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1733

Evaluating EL statements not working consistently

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.5
    • 2.0.7, 2.1.0
    • Expression Language
    • None
    • Mac OS X 10.4/JBoss 4.0.5
      Windows XP SP2/Tomcat

    • Important

    Description

      I'm evaluating Struts2 to use for our upcoming web app. I used WebWork 2.1.7 on our last project, and really liked it, so I'd like to use Struts2 for the new one, but I'm running into a very strange problem.

      I've distilled the problem down into a sample application. There is one action, and one jsp view template. The view contains some EL (eg - ${firstName}) and some Struts2 JSP tags (eg - <s:property value="firstName"/>.

      The first time I hit my page, everything works fine.

      However, if I keep reloading the page, the EL stops working. Nothing gets substituted into the page for the EL statements. The JSP tags continue to work.

      I've tracked it down to this: it is related to the javascript I'm including. I don't believe it matters what's even in the javascript files. If I don't have any <script> tags in my <head>, then everything works fine. If I start to add <script> tags, the EL stops working.

      The sample project, as packaged up, should not work consistently. If you comment out the line including the prototype.js script, it will start working consistently. (note that the prototype.js file is actually empty)

      If you comment out the script line including prototype, it will work. If you leave this line in, it will not work. (note that the prototype.js file is empty)

      I will be attaching a sample project which demonstrates this. I'm working on OS X, with JBoss. I gave this .war file to a co-worker, and we saw the same behavior on his WinXP machine running Tomcat. So I'm hoping that you will be able to see this as well.

      I'm just really confused at this point, I don't understand how having Struts2 write out a <script> line to the HTML would keep the EL from evaluating.

      Attachments

        1. StrutsError.war
          4.44 MB
          Tobin Juday

        Activity

          People

            tschneider Thomas Schneider
            tobinibot Tobin Juday
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: