HomePage | RecentChanges | Preferences

To use messages in ApplicationResources?.properties with JSTL's <fmt:message> tag:

in web.xml (Servlet 2.3)

  <!-- this is necessary for the JSTL <fmt:message> tags to work -->

in struts-config.xml (Struts 1.2)

  <!-- ========== Message Resources Definitions =========================== -->
  <!-- This is the location of the file -->
  <message-resources parameter="ApplicationResources" null="false" />

and ApplicationResources?.properties is stored in WEB-INF/classes

<fmt:message key="button.sort"/>

<fmt:message key="${someBean.propName}"/>

On 2005-11-22 on user@struts, Rahul suggests that this is not recommended and to use <fmt:setBundle> instead

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited November 22, 2005 2:07 pm by WendySmoak (diff)