<bean:write filter="true"/>filter : If set to true, causes the retrieved value to be filtered for HTML reserved characters. If an HTML−specific character is found, it will be replaced by its encoded counterpart. The default value of this attribute is false. (Optional)
如果是这个意思:答案应该是不可以。这样的标签实际上是对应服务器的一个类,它是在服务器端执行的。
因为在<bean:write>字符串里有<br>,能不能把“回车”效果显示出来???
If set to true, causes the retrieved value to be filtered
for HTML reserved characters. If an HTML−specific
character is found, it will be replaced by its encoded
counterpart. The default value of this attribute is false.
(Optional)
输入一带回车的字符串,存入数据库,再通过action读出来放在form里面,然后在页面里的td里使用<bean:write>读出来,回车就成了空格,怎么才能保留回车啊???
而且如果在textarea里通过<%= !!!%>读出来是有回车的!
结果输入:
a
a
a
读出来成了a<br>a<br>a
设置下面的属性达到你的要求:<bean:write filter="false"/>
设置下面的属性达到你的要求:<bean:write filter="false"/>