Struts bean:在字符串上写入格式
是否可以使用
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是您正在寻找的答案。我相信您是对的,无法按照您的说明格式化您的数据。但是,您可以编写自己的自定义标记来执行所需的格式设置。请记住,在 HTML 文档中插入换行符 (
\n
) 不会产生明显影响。如果要换行,则需要插入换行符 (
) 或使用 CSS 在元素后断开。)
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.