From the java docs for MessageFormat:
Within a String, "''" represents a single quote. A QuotedString can
contain arbitrary characters except single quotes; the surrounding
single quotes are removed. An UnquotedString can contain arbitrary
characters except single quotes and left curly brackets. Thus, a string
that should result in the formatted message "'{0}'" can be written as
"'''{'0}''" or "'''{0}'''".
So at a guess, something like:
String str = "<arg name=\"minlength\" key=\"$'{'var:minlength}\" ";
Riyaz Mansoor wrote:
not strictly struts ... but lots of smart guys here :)
String str = "<arg name=\"minlength\" key=\"${var:minlength}\" ";
MessageFormat mf = new MessageFormat(str);
throws error saying "can't parse argument number var:minlength"
how place literal curly brackets in String such that MessageFormat
ignores them?
thanx for helping
riyaz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jason Lea
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]