defining Struts validator message resources

M

matt hegarty

Hi
I am trying to get to grips with the struts validator (1.1), and my
question is whether anyone knows if I can specify the resource file
the validator uses for its messages, or whether it will always use
application.properties by default?

eg, I have the following in struts-config.xml

<message-resources parameter="application"/>
<message-resources key="JSP_MESSAGES" parameter="jsp-messages"
null="false"/>

I have the following in validation.xml

<formset>
<form name="PersonForm">
<field property="surname"
depends="required">
<msg
name="required"
key="errors.required"/>

<arg0
key="surname.title"
resource="true"
/>
</field>
</form>
</formset>

If 'surname.title' is defined in application.properties the label for
the field displays fine on the JSP, but if it is defined in
jsp-messages.properties then it does not display.

How can I tell the Struts validator to look in jsp-messages.properties
for 'surname.title'?

ta
Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top