wood burning stoves 2.0*
The moose likes Struts and the fly likes new line character in properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "new line character in properties file" Watch "new line character in properties file" New topic
Author

new line character in properties file

Oliver Ng
Greenhorn

Joined: Aug 28, 2001
Posts: 15
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

Joined: Jul 29, 2004
Posts: 2
Yes, I have done that many times. You can use html tags in your messages.

regards, BlueShift
John Carnell
Author
Ranch Hand

Joined: Sep 27, 2002
Posts: 71
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


John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br />john.carnell@netchange.us<br /> <br /> <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/159059228X/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
There should be absolutely no problems putting an <HTML> tag inside of a message


Please your example code.


Thank you very much.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341

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

Joined: Aug 28, 2001
Posts: 15
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 ]
 
Consider Paul's rocket mass heater.
 
subject: new line character in properties file
 
Similar Threads
500 Illegal PORT Command using Apache commons net FTP
Displaying a carriage return in a jTable row.
Multiline Tooltip
confustion regarding forward
basic jsp