Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.
Description
Error formatting macro: snippet: java.lang.NullPointerException
For more details on using resource bundles with Struts 2 read the localization guide.
Parameters
Error formatting macro: snippet: java.lang.NullPointerException
Examples
Error formatting macro: snippet: java.lang.NullPointerException
Error formatting macro: snippet: java.lang.NullPointerException
Other example
<s:text name="format.money"><s:param name="value" value="myMoneyValue"/></s:text>
where the following is in a regular (possibly locale-specific) properties file:
format.money={0,number,currency}
For more about formatting text, see
- http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html
- http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
If you wish to use i18n in your tag attributes
This will not work:
<s:textfield name="lastName" label="<s:text name="person.lastName"/>" ../>
Instead, you should use the getText() method that you inherit when your Action extends XWork's ActionSupport:
<s:textfield name="lastName" label="getText('person.lastName')" ../>