Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

new line character in properties file

 
Oliver Ng
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgive me if this sounds stupid, but how do I put a new line in a properties file for the Struts <html:messages> to read them? They always seem to output with my HTML code.

ie
error.welcomeerrror=Welcome<BR> to my error

will output the <BR> instead of reading it as html.

any help appreciated.

Thanks
 
Blue Shift
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I have done that many times. You can use html tags in your messages.

regards, BlueShift
 
John Carnell
Author
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Oliver,

There should be absolutely no problems putting an <HTML> tag inside of a message. In the JavaEdge application, I use them all over the place. How you are actually rendering the message using the <html:message> tag?

Thanks,
John
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be absolutely no problems putting an <HTML> tag inside of a message


Please your example code.


Thank you very much.
 
Surasak Leenapongpanit
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How you are actually rendering the message using the <html:message> tag?


I usually use <html:message> tag instead of <html:errors/>. For example

 
Oliver Ng
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i solved this problema long time ago but for anyone wondering...

I was using jstl Cout message tags, and there is an attribute escapeXml=true

also, for bean:Write messages, there is a filter=false attribute to not convert the html to text automatically
[ August 30, 2004: Message edited by: Oliver Ng ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic