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

Accessing static variable via OGNL returns nothing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.5.20
    • 2.5.22, 6.0.0
    • None
    • None

    Description

      Accessing static variables of a public class does not seem to work. I tried setting the struts.ognl.allowStaticMethodAccess = true in the project root's struts.properties but it didn't change anything.

      <s:property value="@de.mytest.common.Constants@CONSTANT" default="Nothing" />
      

      For this, I get "Nothing" as the output. It seems to have worked in 2.5.18.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              k918912 k918912
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: