Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titlePackage hierarchy
Wiki Markup
{snippet:id=packagenote|javadoc=true|url=com.opensymphony.xwork2.util/LocalizedTextUtil.java}

Default action's class

If you configure action as follow

Code Block
xml
xml
<action name="index">
   <result>/index.jsp</result>
</action>

it will use a default class defined with default-class-ref in struts-default.xml which is com.opensymphony.xwork2.ActionSupport. It means you have two options here to get I18N working in that case:

  • define com/opensymphony/xwork2/ActionSupport.properties and put message there
  • change default-class-ref to your base class and then defined appropriated .properties file (corresponding to class' name or package)

Examples

There are several ways to access the message resources, including getText, the text tag, and the i18n tag.

...