Steven 的 IT 學習旅程
網頁
首頁
Java Learning Resources
Learning Resources for Data Science
Learning English
參考資料
2011年2月7日 星期一
將字串編碼成 html 格式
在寫 servlets/JSPs 時, 常要要輸出符合 html 格式的字串, 例如:
"bread" & "butter" 要變成 "bread" & "butter"
有現成的套件可以做此轉換.
org.apache.commons.lang.StringEscapeUtils
這個類別提供了:
public static String escapeHtml(String str)
可以將字串轉成 html 的格式.
Reference:
*
Apache Commons
*
escapeHtml()
*
Robin's Tech Tips
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
熱門文章
使用 JDAPI 開發 Oracle Form 程式: 開發環境安裝及設定
Netbean 8 上的常用快速鍵 (Keyboard Shortcuts)
Credit Memo & Debit Memo 的概念
小鎮文化 韓式烤肉
Shared library and isolated shared library
沒有留言:
張貼留言