struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Behrens" <>
Subject application resources and escape characters
Date Sat, 24 Jul 2004 17:19:46 GMT
Hi list,

I extract language specific messages from the struts application resources
within my applications logic to generate the subject and body of auto
generated emails. I used to do this via string constants but switched over
to using the resources. Everything works fine except the line breaks I would
like to have in the text. I generate only plain text emails and used to have
something like the following to insert line breaks whenever I needed them:

String body = "This is a test \n\n new line below...";

Resulting in the following email body: 

<mail body>
This is a test

new line below...
</mail body>

That worked fine as long as I used the String constants (as in the example
above) but ceased to do so after switching to the
org.apache.struts.util.PropertyMessageResources variant. My application
resources contain the same string as before but the email message then looks
like this:

<mail body>
This is a test \n\n new line below...
</mail body>

Any ideas how this can happen, or possibly a solution? I can not fall back
to sending html mails unfortunately...

TIA, Jan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message