Available categories: [/] [development. ~] [working on downwap.] [trouble shooting] [working on Yup Mailman] [general infomation.] [life style]
Tomcat 2 Weblogic Migration | Tomcat到Weblogic移植 [Permalink] Sat Sep 24 10:41:04 CST 2005 出于性能、扩展性等等一大堆理由,downwap工程由tomcat移植到了weblogic81sp2上。
移植完毕以后做了压力测试,性能的确好不少。不过要说原因,估计和Tomcat的JK、JRockit的调整、代码整理都有关系。倒不一定是AppServer在这个级别应用上的差距体现。
Posted by: miles 正确设置request传入内容的编码|set charset encoding properly [Permalink] Thu Aug 18 11:50:21 CST 2005
* Overrides the name of the character encoding used in the body of this * request. This method must be called prior to reading request parameters * or reading input using getReader().
Posted by: miles blog google排名第一!恭喜自己一个! [Permalink] Thu May 26 16:25:02 CST 2005 在google搜索包含miles的简体中文网页,结果如下:
Posted by: miles firefox wmlbrowser extension的select bug终于解决了 [Permalink] Thu May 26 16:20:49 CST 2005 bug#9321, Sorry about that, I'd forgotten about it to be honest. I'll try and sort something out soon. Matthew当时真是晕啊~~这么好的DD难道只有我一个人用么???? ![]()
Posted by: miles cvs错误:cannot find .: No such file or directory [Permalink] Tue May 10 09:47:22 CST 2005 服务器重整以后,cvs update/commit时候会出现如下错误提示:
Posted by: miles JTDS: A bug while preforming full-text search [Permalink] Tue Apr 19 15:29:59 CST 2005 When took JTDS as MSSQL jdbc driver and did a pre-query like this:
Posted by: miles TOMCAT 5: 关于Connector的URIEncoding属性|About "URIEncoding" attribute in the "Connector" tag. [Permalink] Tue Apr 19 14:09:48 CST 2005 tomcat5中,因为众所周知的原因,为了保证get/post数据都采用相同的UTF8编码,我们在server.xml中进行了如下设置: <Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="99" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>这里指定了get时候的数据编码。但是,当使用IIS作为webserver转发servlet/jsp请求给Tomcat时候,这个设置却失效了。其实原因很简单:IIS是通过AJP协议,把请求转发到Tomcat监听的8009端口上的,所以这里针对8080的设置自然就无效了。正确的方法是进行下面的设置: <Connector port="8009" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3" URIEncoding="UTF-8"/>虽然是小问题,却花了我几个小时才想到。 ![]()
Posted by: miles d-o-e PI以及奇怪的namespace问题 [Permalink] Fri Mar 25 19:16:40 CST 2005 在xslt中,经常有需要保留<>,不把它替换成<>的需求。比如今天就遇到了需要在xslt中利用xalan调用java static method,生成部分wml代码的情况。按规范上说,只需要用 <xsl:value-of disable-output-escaping="yes" select="string('<')"/>这样的方式,就可以达到目的。这种方法在MSXML中完全没有问题。可是,到了java中情况就完全不同了。上述代码得到的是这样的一个半成品: <?javax.xml.transform.disable-output-escaping?>意思似乎是让你再找个什么玩意作二次转换。可是找了一圈也没有找到处理这个d-o-e PI的办法。鉴于时间有限,只能用笨办法了:就是字符串分析替换。邮件列表里面很多人都遇到了这个问题而且一筹莫展,真搞不懂这个设计是什么意思 ![]() 做了半天苦力搞好了这个问题,新的,更BT的问题又来了。这样的一个xsl文件: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:funcs="xalan://com.yupstudio.app.downwap.common.util.XSLTFuncs"> <xsl:output method="wml" omit-xml-declaration="no" indent="no" doctype-public="-//WAPFORUM//DTD WML 1.3//EN" doctype-system="http://www.wapforum.org/DTD/wml13.dtd" /> ......实在搞不清楚为什么会有这样的输出: <wml xmlns:funcs="xalan://com.yupstudio.app.downwap.common.util.XSLTFuncs">这个namespace说明的attr为什么会加入这里?要知道到生成这个结果的时候,xalan已经发挥完作用了啊!解决方式仍然是简单粗暴:用regexp直接搞掉 最后,一个字总结今天的心得——郁闷成P了! 补充一下,前两天这个namespace错误又有出现。观察现象发现当主xsl和include进来的xsl的 xsl:stylesheet 标签中的xmlns声明部分有不同时就会使得included xsl的顶级标记中出现xmlns的声明。例如主xsl(main.xsl): <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:funcs="xalan://com.yupstudio.app.downwap.common.util.XSLTFuncs">从xsl(footer.xsl): <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:funcs="xalan://com.yupstudio.app.downwap.common.util.XSLTFuncs" xmlns:digest="xalan://com.yupstudio.app.downwap.common.util.DigestUtil">那么在footer xsl负责解析的wml底部的那个 P 标记就会成为:
<xmlns:digest="xalan://com.yupstudio.app.downwap.common.util.DigestUtil">修改主从的xmlns定义一致即可解决问题。 --08-01-18
Posted by: miles Office版本差异导致的.net调用Excel的问题 [Permalink] Tue Mar 01 11:33:32 CST 2005 为了处理excel文件的数据导入,我使用了Excel.Application这个对象。在我的OfficeXp环境下,打开workbook的做法是这样的: oWB=oXL.Workbooks.Open(XlsFile.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);可是到了客户的Office2000环境下,竟然出了这个不知所云的错误:
****** [ERROR] ****** 每个实例都货真价实,怎么会有空指针错误呢?经过n小时调试(装VMware和win2kp/office2k用n-1小时 ![]() oWB=oXL.Workbooks._Open(XlsFile.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);就太平了。另外SaveAs时候office2003和officexp/2000也不一样。同理提供了_SaveAs。 用OleViewer查了COM接口,新的Open加入了 [in, optional] VARIANT Local, [in, optional] VARIANT CorruptLoad,这样两个参数。应该是新版office提供的功能。不过长此以往,不得______Open了么?反正现在Wookbooks接口的OpenText已经到了__OpenText。。COM不熟,不知道这是不是规范使然。 问题解决了,不过确是挺郁闷。为什么要NullRefException而不是InvalidOperationException呢?但愿是因为.net和COMinterop的关系,所以产生一个正确的异常起来不像想象的那么容易。否则就真的是RPWT了。
Posted by: miles DataGrid.RowHeaderClick 事件 | event [Permalink] Wed Jan 26 14:06:00 CST 2005 如何得到点击datagrid行首的动作?datagrid类有RowHeaderClick事件,可实际上它的modifier是protected,也就是说不能直接访问。这里只能这样绕弯子: private bool isHitOnHeader( DataGrid dg ) { Point pt = dg.PointToClient(Cursor.Position); DataGrid.HitTestInfo hti = dg.HitTest(pt); return hti.Type == DataGrid.HitTestType.RowHeader; }通过测试鼠标hit的位置确定点击性质的确奇怪了一点。MSDN中没有解释。
Posted by: miles |
? |
Available categories: [/] [development. ~] [working on downwap.] [trouble shooting] [working on Yup Mailman] [general infomation.] [life style]
html hits:?23564