On 7/12/07, Niall Pemberton <[EMAIL PROTECTED]> wrote:
I don't use Struts2 - but my guess is that this is down to a single
quote being an escape character in MessageFormat:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html
So its probably not a bug - just need to escape singl
On 7/12/07, Josh Vickery <[EMAIL PROTECTED]> wrote:
Actually, I think this is a bug in the handling of MessageResources in
Struts 2. Not only do ' characters in properties files fail to
display, they cause parameter substitution to fail. For example, if
you have a properties file:
I don't use
I wrote my string in my .properties file
mylabel=Now it''s working
and then a got it
in my .jsp with
Antonio Petrelli-3 wrote:
>
> 2007/7/12, TonyD <[EMAIL PROTECTED]>:
>>
>>
>> Thanks it works!
>
>
>
>
> Mmm... this means that there's something wrong when you display the text.
> I th
Actually, I think this is a bug in the handling of MessageResources in
Struts 2. Not only do ' characters in properties files fail to
display, they cause parameter substitution to fail. For example, if
you have a properties file:
foo=Message's for {0}
and you attempt to display it in a jsp lik
2007/7/12, TonyD <[EMAIL PROTECTED]>:
Thanks it works!
Mmm... this means that there's something wrong when you display the text.
I think that, before writing the string, you have to escape it.
How, and where, do you write the string?
Antonio
Thanks it works!
Pascal Lalonde-4 wrote:
>
> This should be the good solution, that's what we do ...
>
> [EMAIL PROTECTED] wrote:
>> try to double the '
>>
>> ex.:
>>
>> mylabel=I don''t know how
>>
>>
>>> If in my .properties file I have text with the ' character
>>>
>>> my.properties (fil
This should be the good solution, that's what we do ...
[EMAIL PROTECTED] wrote:
try to double the '
ex.:
mylabel=I don''t know how
If in my .properties file I have text with the ' character
my.properties (file)
mylabel=I don't know how
...
The output doesn't display the ' character
I had the same problem, and I put ’ instead of ' in my .properties.
Ragards,
Michaël
TonyD <[EMAIL PROTECTED]>
12/07/2007 14:29
Veuillez répondre à
"Struts Users Mailing List"
A
user@struts.apache.org
cc
Objet
How to display the ' character from a .prope
try to double the '
ex.:
mylabel=I don''t know how
>
> If in my .properties file I have text with the ' character
>
> my.properties (file)
>
> mylabel=I don't know how
> ...
>
>
> The output doesn't display the ' character
>
> I dont know how
>
> Do I need a special character before the ' charac
2007/7/12, TonyD <[EMAIL PROTECTED]>:
Do I need a special character before the ' character?
Which one?
I could say the backslash ( \ ) but the apostrophe is not a special
character to be escaped (such as = ! ) so I wonder why you cannot see it...
Antonio
If in my .properties file I have text with the ' character
my.properties (file)
mylabel=I don't know how
...
The output doesn't display the ' character
I dont know how
Do I need a special character before the ' character?
Which one?
Thanks.
--
View this message in context:
http://www.n
11 matches
Mail list logo