Reputation: 53
I am trying to escape characters
<s:select list="#{'Achat d'eclair':'Achat d'eclair'}" />
How can I escape Achat d'eclair
in Struts2 tags ?
Upvotes: 5
Views: 713
Reputation: 24396
First of all with #{}
notation you're creating a map where value before :
is a key and after is a value and you probably don't want that the key of your map would be with some complex characters in it.
To escape '
use \\
like so:
<s:select list="#{'achatdeclair':'Achat d\\'eclair'}" />
Upvotes: 4