Avoiding curly braces in .properties file in Struts 1.2

I have a requirement to save curly braces from a properties file in my processed JSP code. Is it possible?

I tried to options such as: \{, '{, {{, '{', /{, but without help.

At runtime, I get an exception:

java.lang.IllegalArgumentException: cannot parse argument number

The problem is that struts processes {}as a placeholder for the runtime value. Any help was greatly appreciated.

+5
source share
3 answers

10 . : '& # 123' '{'. (: http://www.asciitable.com/)

Oct Hex-, Java { ; . HTML- , Java , JSP

+1

MessageFormat: http://download.oracle.com/javase/1.4.2/docs/api/java/text/MessageFormat.html

String "'" . QuotedString , ; . UnquotedString . , , "'{0}'" "'' '{' 0} ''" "'' '{0}' ''".

, , , , '''{'.

0

All Articles