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)
熱門文章
Netbean 8 上的常用快速鍵 (Keyboard Shortcuts)
Credit Memo & Debit Memo 的概念
PrimeFaces 處理 Ajax request 過程中所產生的 callbacks 及 events
Oracle Forms Builder 11gR2 安裝手冊
如何將資料庫中的 table scheme 匯入到 SQL Developer Data Modeler 中
沒有留言:
張貼留言