tags:

views:

21

answers:

0

Hi,

Below is my code in jsp.

<s:iterator value="msgList" status="stat" id="element">
            <tr>
                <td><s:label key="msg" /></td>
                <td><s:property value="value" /></td>
            </tr>
 </s:iterator>

msgList is a list which contain Message class. Message class is having 2 member variables msg and value.

my struts property file is having entries like

msg1= Good morning
msg2= Good evening

In jsp i need to display lebel key attribute value dynamically.

while iterating msg is getting values like msg1 and msg2. But out put of <s:label key="msg" /> is msg: msg1 which is wrong. It should be msg1 and out put should be Good morning.

Pls let me know where I am making mistake.