Hi Is there a way to include a linebreak within a msg resource item and have it displayed as a linebreak when displaying the message with the bean:message tag?
I would like to do this: my.resource=A line with <br/> a linebreak.
And have it displayed on my JSP page as: "A line with a linebreak." when using <bean:message key="my.resource"/>
The question also applies when reading a string from a database, can it contain linebreaks that will be interpreted as a linebreak when displayed with a struts tag?
Hi again. This problem have been solved by reading the documentation... doh... :roll:
1) bean:write has a filter attribute that can set to false to disable the feature that rewrites any "characters that are sensitive in HTML". This way a <br/> tag can be placed in e.g. a database and it will be interpreted as a HTML tagg when rendered.
2) bean:message seems to work OK with linebreaks in resources located in resource file. I guess I did something else wrong when trying this last time. [ November 24, 2005: Message edited by: P-A Rosenberg ]