I got why: I have to name the same property file name as the action class. Rename "package.properties" to ProcessInfo.properties, I got correct result.

I just wonder isn't "package.properties" is recognized automatically?

May I know how to use "package.properties" to display getText() in jsp please?

More testing results are:

(1) Action class can recognize both "ProcessInfo.properties" and "package.properties"

(2) JSP recognized "ProcessInfo.properties"

(3) but I do not know how jsp can recognize "package.properties"?

--
Lu Ying








Take a look at this example

<s:property value="%{getText('edit.action')}" />
what is displayed when property is displayed in jsp?

I got the same value displayed "edit.action" :( Do you know where I did wrong please?
A question about getText in jsp file. I'd like to get value from property file.

in package.properties,
edit.action=Edit information


in jsp,
...
<s:i18n name="info.ProcessInfo">
  <s:form action="ProcessInfo" >
    <s:submit name="submit" value="%{getText('edit.action')}" />
  </s:form>
</s:i18n>


The result always shows "edit.action" as the button value, but not "Edit information". Could someone tell me where I did wrong please?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to