How to use the <s: property> tag in <s: text> in struts 2
Is it possible to use the s: property tag in the s: text tag in Struts 2. The problem is what I have Mapin my Action class
Map menuMap = new HashMap<String, String>();
menuMap.put("home()", "lbl.home.home");
menuMap.put("mymodule()", "lbl.home.mymodule");
menuMap.put("adduser()", "lbl.home.adduser");
menuMap.put("changepassword()", "lbl.home.chngPwd");
The map has a key / values like String, Actually the values exist in the Map - the keys exist in the file application.properties, please see below.
This is my Application.properties file
lbl.home.home = Home
lbl.home.adduser = Add User
lbl.home.mymodule = My Module
lbl.home.chngPwd = Change Password
Now I want to iterate over this map in my jsp and want to get these values from the properties file, passing the values of the map as a key in the application.properties file and showing them as a shortcut
I can get the key, but not able to display the values from the properties file
This is mine Jsp code:
<s:iterator value="menuMap">
<tr>
<td>
<a href="#" onclick="<s:property value="key"/>" ><s:text name="<s:property value='value'/>"/></a>
</td>
</tr>
</s:iterator>
, , , a , onclick(), . , , .
+5