First, paragraph tags have *zero* to do with it, regardless of any behavior you're seeing.
On Wed, Jun 20, 2012 at 12:24 PM, Sam Cyrus wrote: > <p>It is possible to fetch the static helloCount outside paragraph > tags: </p> <s:property value="helloCount" /> > I'm a little surprised that works without a getter in the action. <p>Inside paragraph tags the static helloCount preceded by @-prefix > returns <s:property value="@helloCount" /> empty times!</p> > This isn't the syntax for static property access. > <p>Inside paragraph tags the static helloCount without @-prefix returns > <s:property value="instanceCount" /> empty times!</p> > Why is a static property called something with an "instance" name? Are you sure you're looking at what you think you are? <p>By assigning the static value to an instance variable inside the > execute method <s:property value="instanceCount" /> works well inside > p-tags</p> > Sure; this would call `getInstanceCount()` (or in some versions of S2, it can just be a public property). > <p> Still strange! The DAY-OF-WEEK is static but possible to fetch > inside p-tags: <s:property value="@java.util.Calendar@DAY_OF_WEEK"/> as > expected</p> > Nothing strange, that's how static property access works. Without knowing what the action looks like, it's impossible to address things beyond the above, because we don't know anything about what's on the value stack. Dave