AverageMarcus
AverageMarcus

Reputation: 903

Struts bean:write formatting on a string

Is it possible to format a string using the <Bean:write> tag in struts? I'm currently trying to convert an address string to display with newlines after each comma (,). From what I've been able to find out its not possible but I'm hoping someone might be able to give a better insight.

Upvotes: 0

Views: 2321

Answers (1)

DwB
DwB

Reputation: 38328

This is not the answer you are looking for. I believe that you are correct, there is no way to format your data as you noted. You can however, write your own custom tag to perform the desired formatting. Remember that inserting a newline (\n) in an HTML document has no visible impact.If you want to break a line, you need to insert a line break (<br/>) or use CSS to break after the element.

Upvotes: 1

Related Questions