發表文章

目前顯示的是 3月, 2015的文章

UTF-8 CSV 亂碼問題

要寫入UTF-8 BOM表頭,才能用office直接打開不會看到亂碼。 out = response.getOutputStream();     //UTF-8 BOM out.write(new   byte []{( byte ) 0xEF ,( byte ) 0xBB ,( byte ) 0xBF });    http://rainbow702.iteye.com/blog/1426354 http://blog.darkthread.net/post-2009-09-06-csv-encoding-again.aspx http://boringfreeware.blogspot.tw/2013/05/office-excel-csv.html http://wen198599.pixnet.net/blog/post/22314819

mysql-connector-java設定方法

問題:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 1. 放到<web app>\WEB-INF\lib ps.此方法容易造成: Mar 02, 2015 8:40:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. Mar 02, 2015 8:40:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. 2. 用eclipse build path add your folder to the build path     Project Properties -> Java build path     Libraries -> add external lib or any other solution to add your files/folder add your build path to deployment Assembly (reference)     Project Properties -> Deployment Assembly