Available categories: [/] [development. ~]
A permission problem during MRTG intallation|MRTG安装中的权限问题 [Permalink] Mon Mar 05 14:10:13 CST 2007 今天给136配置了MRTG服务,用来监控流量。由于安装过太多次,所以整个过程都很顺利。安装到位后启动时出现如下错误: 2007-03-05 13:39:49 -- ERROR: Skipping webupdates because rateup did not return anything sensible 2007-03-05 13:39:49 -- WARNING: rateup died from Signal 0 with Exit Value 1 when doing router '127.0.0.1_16777219' Signal was 0, Returncode was 1 2007-03-05 13:39:49 -- ERROR: Skipping webupdates because rateup did not return anything sensible 2007-03-05 13:39:49 -- WARNING: rateup died from Signal 0 with Exit Value 1 when doing router '127.0.0.1_16777220' Signal was 0, Returncode was 1上网搜了一下,没有找到贴题的文章,但是看到好几个由于权限问题导致的MRTG错误。所以检查了一下MRTG的output dir,把这个目录的权限设置为Everyone可写,问题解决。看来应该是启动MRTG的帐户对这个目录权限不足造成了写入文件失败。特此记录,一面日后重蹈覆辙。
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 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 一个奇怪的中文编码问题的粗暴解决办法 [Permalink] Fri Jan 21 08:14:45 CST 2005 老系统中文编码有问题。如果不设置contentType为 public class HtmlMimeResponseWrapper extends HttpServletResponseWrapper { //.... public PrintWriter getWriter() throws IOException { PrintWriter writer = super.getWriter(); MyWriter myWriter = new MyWriter(writer); return myWriter; } //... }没错!就是用一个filter,把他的PrintWriter包裹起来。decorator里面decorate,哈哈。。PrintWriter是一个内部类,细节如下: class MyWriter extends PrintWriter { PrintWriter writer; public MyWriter(PrintWriter writer) { super(writer); this.writer = writer; } // 关键在这里! public void write(String buf) { String newbuf = null; try { newbuf = new String(buf.getBytes("iso-8859-1")); } catch (UnsupportedEncodingException ex) { } writer.write(newbuf); } public boolean checkError() { return writer.checkError(); } public void print(Object obj) { writer.print(obj); } public void print(String s) { writer.print(s); } public void print(boolean b) { writer.print(b); } public void print(char c) { writer.print(c); } public void print(char[] s) { writer.print(s); } public void print(double d) { writer.print(d); } public void print(float f) { writer.print(f); } public void print(int i) { writer.print(i); } public void print(long l) { writer.print(l); } public void println() { writer.println(); } public void println(Object x) { writer.println(x); } public void println(String x) { writer.println(x); } public void println(boolean x) { writer.println(x); } public void println(char x) { writer.println(x); } public void println(char[] x) { writer.println(x); } public void println(double x) { writer.println(x); } public void println(float x) { writer.println(x); } public void println(int x) { writer.println(x); } public void println(long x) { writer.println(x); } public void close() { writer.close(); } public void flush() { writer.flush(); } public void write(String str, int off, int len) { writer.write(str, off, len); } public void write(char[] cbuf) { writer.write(cbuf); } public void write(char[] cbuf, int off, int len) { String s=new String(cbuf, off, len); this.write(s); } public void write(int c) { writer.write(c); } }现在把问题从头掐了。虽然粗暴了一点,不过效果达到了。对于那些没有时间深究,或者懒得深究的问题,用这样的方法还是不错的。 另外值得一提的是jb的Delegate member wizard功能。通过他可以快速的作出一个Wrapper类,不用把super class的方法都一个一个去机械的实现,很是省力。只不过以前的jb里,这个功能处于Wizard主菜单,而现在则藏到了Edit下。。害我一顿好找 ![]()
Posted by: miles mail.jar无法释放 [Permalink] Thu Dec 09 10:04:51 CST 2004 环境:win2k+tomcat5.0.24
我的webapp用到了java mail api。按理说每次上传新的xxx.war以后,tomcat会先清除现有的xxx目录,然后展开新war。可是我这个应用却出了问题:web-inf/lib/mail.jar无法删除,提示占用(其他的jar、jsp已经全部删掉了)!只有shutdown tomcat才可以删除并重新deploy。。
Posted by: miles firefox和ie对于<input type=file>的不同处理 [Permalink] Tue Dec 07 14:27:08 CST 2004 传递过来的filename,IE会是全路径,而firefox则是文件名。因为这个前两天还搞出来一个bug。 其实按理说,后者更合理。因为对于server端,没有必要也没有权利得到客户端的文件完整路径信息。
Posted by: miles |
? |
Available categories: [/] [development. ~]
html hits:?23586