You can use this : 

<c:forEach items="${userMenuList}" var="item">
  <c:set var="link">
    <bean:message key="${item.link}"/>
  </c:set>
  <html:link page="${link}">
     <bean:message key="${item.value}"/>
   </html:link>
   <br>
</c:forEach>


Nico.

----- Original Message ----- 
From: "Pavlikus" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 21, 2004 4:04 PM
Subject: html-el:link and url from resources


> Hi all. My menus defined in resources file.
> 
> Like that:
> user-menu.profile =Edit profile
> user-menu.profile.link =/EditProfile.do
> user-menu.profile.tooltip =Edit your preferences
> 
> Now, when i want to show menu items, I run into unexpectedness.
> I can't show url in html:link tag. Instead it shows the property key.
> How can I do that?
> 
> My code:
> 
> <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
> <%@ taglib uri="/tags/struts-html-el" prefix="html" %>
> <%@ taglib uri="/tags/struts-bean-el" prefix="bean" %>
> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> 
> <tiles:importAttribute />
> 
> 
> <jsp:useBean id="userMenuList" class="java.util.Vector" scope="page"/>
> 
> <c:forEach items="${userMenuList}" var="item">
>   <html:link href="${item.link}">
>      <bean:message key="${item.value}"/>
>    </html:link>
>    <br>
> </c:forEach>
> 
> I tried to put <bean:message key="${item.link}"/> into html:link href
> - but it is not valid jsp construction. Also I tried to use <a
> href="<bean:define...>"> - that don't work too.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to