輸出的結果頁面顯示出html 源代碼而不是 顯示html 的排版后的效果原因:
在bean:write中輸出時的filter 設置錯誤
解決辦法:
在bean:write中輸出時的filter 設置應為false
例如:
<bean:write name="news" property="contentBody" filter="false" />
如果設置為
<bean:write name="news" property="contentBody" filter="true" />
那么就會把contentBody 的html代碼轉化
比如如果contentBody中含有<p> 結果就會變成為<p>