I need to give a text input field a default value and I want to
get this default from the message properties file. Something like:

        <html:text property="kontonummer" size="10"
          value='<bean:message key="overview.title"/>' />

Of course, this doesn't work and I assume I'll have to replace
the <bean:message> with a scriptlet. I'm not sure what should
be in that scriptlet, though. Looking at the <bean:message>
implementation shows it to be rather complicated to get the
messages from the properties file. You need to find the
MessageResource object, then the Locale object, and then make
your call. Quite a bit of work for a scriptlet.

Is there an easier solution? I guess I could put the lookup
logic in the form bean but that is not ideal either. Any tips
would be appreciated.

Devon

Reply via email to