In a mail from 13:44 +1200 3/23/03 Jason Lea wrote:

Dolf pointed out this doesn't solve the problem due to the use of the <html:link> on his jsp page. After looking around I have learnt something new :) and have found a solution (using Java Servlet 2.3 and JavaServer Pages 1.2 eg Tomcat 4+.)

You can use the JSTL & Struts-EL (expression language)...

You can then use these tags:

<c:set var="logoutAction"><bean:message key="logout.action"/></c:set>

<c:set var="clickHere"><html:link forward="homepage"><bean:message key="click.here"/></html:link></c:set>

<bean:message key="preferences.test" arg0="${logoutAction}" arg1="${clickHere}"/>


That was very helpful. I wanted to do this without any additional tag libraries, and you got me on the right path. Here is the solution:

In the props file:
msg.full=If you want to x, click {0}
msg.here=here

In the page:
<bean:define id="link">
  <html:link forward="/monkey">
    <bean:message key="msg.here"/>
  </html:link>
</bean:define>
<bean:message key="msg.full" arg0="<%= link %>"/>

--dolf

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



Reply via email to