@jpf:message-resources Annotation

You can use the @jpf:message-resources annotation at the page flow class level to specify a message bundle. Using message resources allows you to internationalize your web applications by not hard-coding labels in your JSP pages. For example, an ErrorMessages.properties resource file could contain messages to display when form validation errors occur.

Syntax

@jpf:message-resources

resources = "<property-resources>"

[ key = "<bundle-key-name>" ]

Attributes

resources

Required. A resource that contains message properties, such as an Errors.properties file that you create separately and place in a subfolder under the page flow's /WEB-INF/classes folder. For example:

@jpf:message-resources resources="validation.ErrorMessages"

The page flow runtime will look for the messages in a subfolder of the web project's /WEB-INF folder, either:

key

Optional. You can specify the name of the ServletContext attribute in which to store the Bundle read from the <property-resources>. In most cases you can omit this attribute and accept the default of org.apache.struts.Globals.MESSAGE_KEY, which works with the <netui:error> and <netui:errors> JSP tags provided by WebLogic Workshop.

Remarks

The following rules apply to this annotation's use:

Related Topics

@jpf:catch Annotation

@jpf:controller Annotation

@jpf:exception-handler Annotation

@jpf:forward Annotation

@jpf:validation-error-forward Annotation

Getting Started with Page Flows