Java
leobug
这个作者很懒,什么都没留下…
展开
-
Servlet 输出中文乱码的新收获(1)
又碰到servlet 输出中文乱码的问题,恼火。研究了一下,有了新的发现和认识。原始代码:java 代码 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWri...2007-03-08 14:48:00 · 111 阅读 · 0 评论 -
Servlet 输出中文乱码的新收获(2)
(续)查看setCharacterEncoding API文档,进一步发现:Calling setContentType(java.lang.String) with the String of text/html and calling this method with the String of UTF-8 is equivalent with calling setContentType...2007-03-08 15:12:49 · 74 阅读 · 0 评论 -
解决proxool必须把用户名和密码写在连接串里面的bug
一直以来proxool都存在这个bug,在Spring的"applicationContext.xml"中定义dataSource时,必须把用户名和密码写在连接串里面,ProxoolDataSource类提供的user,password属性没有用,无论提供什么,它都会以空用户名、密码去连接数据库,不过配置中的user,password两个属性还必须设置,否则会报空指针错误。 这种方式还有另外一...2008-07-11 11:00:41 · 245 阅读 · 0 评论 -
proxool CharConversionException问题的解决
最近使用proxool监控界面的时候碰到了一个问题,查看连接池snapshot时抛出异常java.io.CharConversionException: Not an ISO 8859-1 character: 网上搜了一下碰见这个问题的还不少,但是没有找到解决方案,看到有人的解决方案是从tomcat6降为5.5,汗!今天有时间,自己看了一下源码,发现了问题所在,在pro...2008-04-15 20:23:24 · 123 阅读 · 0 评论