Hi,

I am trying to follow the tutorial Hello World for Struts2. In the part "Using 
Struts 2 Tags" it uses s:property to fetch the value for the helloCount 
variable inside a paragraph tag but doing as the example shows, doesn't get any 
value and the place is empty in HelloWorld.jsp. The lines below from this jsp 
shows my different trials and when it works. I would like to know the reason:

<body>
    <h2><s:property value="messageStore.message" /></h2>

    <p>It is possible to fetch the static helloCount outside paragraph tags: 
</p> <s:property value="helloCount" />

    <p>Inside paragraph tags the static helloCount preceded by @-prefix returns 
 <s:property value="@helloCount" />  empty times!</p>

    <p>Inside paragraph tags the static helloCount without @-prefix returns  
<s:property value="instanceCount" />  empty times!</p>

    <p>By assigning the static value to an instance variable inside the execute 
method <s:property value="instanceCount" /> works well inside p-tags</p>

    <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>
</body>

Best regards
/// Sam Cyrus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to