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)
熱門文章
難得一見的蜜蜂
Credit Memo & Debit Memo 的概念
Thefourth day to eat out in 中華壽司
使用 Maven 匯出 Apex Application file 到本地端電腦
Oracle ORDS 404 Not Found Trouble Shooting
沒有留言:
張貼留言