关于web services我推荐一本书
《O’Reilly – Java Web Services in a Nutshell.chm》
《O’Reilly – Java Web Services in a Nutshell.chm》
反模式的缺点: 1.职责不清晰。这点相当致命,让看代码的人非常迷惑 2.让抽象、统一的东西给某个具体、特殊的东西开了后门,形成倒置了的依赖,极其不利于需求变更
摘自 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html JAVADOC TAGS The Javadoc tool parses special tags when they are embedded within a Java doc comment. These doc tags enable you to autogenerate a complete, well-formatted API from your source code. The tags start with an "at" sign (@) and are case-sensitive — they must be typed with the uppercase and lowercase …
以下代码中,如果第一次out.close()不报异常,则第二次也不会报 OutputStream out= new FileOutputStream( "c:/temp/result.xls"); out.close(); out.close();
1.不要依赖finalization来达到程序的正确性 2.不要依赖线程的优先级比较来达到程序的正确性
xmlHttp.responseText的默认编码是UTF-8 而response如果没有显式设置的话,不管request的编码是什么,response的编码就是ISO-8859-1。所以将servet 与 ajax联用的时候,注意将response的编码设成与ajax一致
如: sb.append(articleCatagoryName).append(articleCatagoryRealName).append(articleCatagorySequence)
<property name="driverClassName"> <value>net.sourceforge.jtds.jdbc.Driver</value> </property> <property name="url"> <value> jdbc:jtds:sqlserver://192.168.20.55:1433;DatabaseName=hello </value> </property> "jdbc:jtds:sqlserver://192.168.20.55:1433;DatabaseName=hello"和前后的<value>标签之间不应该有空格和换行 就因为url属性用了两个换行符,搞了两三个小时也没找出原因。因为spring居然不报url的错,而说无法load net.sourceforge.jtds.jdbc.Driver这个类!
使用Runtime.getRuntime().exec()方法时要注意Working Directory 如果不设定Working Directory,被调用进程的工作目录就是调用进程的工作目录 设定方法是:使用以下方法调用 Runtime.getRuntime().exec(command, envp, dir), dir就是工作目录