Hi,
I am trying to get my page to link to a certain URL that is stored in a HashMap (the key is some name, and the value is the URL I want to link to). I'm not very good at describing this, but here is my code:
For the JSP page:
<table>
<s:iterator value="dependenciesList" id="dependency">
<tr><td>
<a href="<s:url value="productDocumentationMap.getKey(%{dependency})"/>">
<s:property value="dependency"/> </a>
</td></tr>
</s:iterator>
</table>
Note: productDocumentationMap is a HashMap of <String, String>,
and dependenciesList is an ArrayList<String>
.
For instance, if dependenciesList contains three elements [A, B, C], the first link would link to something like: http:///productDocumentationMap.getKey(A) but what I want is for the link to be the actual value of
productDocumentationMap.getKey("A");
I know I might be doing something stupid (I'm still new to all this Struts2 business), but is there a way I can get my link to work? Thanks!