05 2017 档案
摘要:1.设置Cookie Cookie cookie = new Cookie("key", "value");cookie.setMaxAge(60); 设置60秒生存期,如果设置为负值的话,则为浏览器进程Cookie(内存中保存),关闭浏览器就失效。 cookie.setPath("/test/te
阅读全文
摘要:setMaxInactiveInterval和session-config的比较: 1、setMaxInactiveInterval的优先级高,如果setMaxInactiveInterval没有设置,则默认是session-config中设置的时间。 2、setMaxInactiveInterva
阅读全文
摘要:中文乱码tomcat目录server.xmlconnector port="8080" 位置添加一条 useBodyEncodingForURI="true" //使用页面设置的编码 request.setCharacterEncoding("utf-8");//设置编码格式response.set
阅读全文
摘要:数据定义DDLcreate alter drop truncate 数据操纵DMLinsert select delete update 事务控制TCLcommit savepoint rollback 数据控制DCLgrant revoke cmd连接数据库sqlplus system/123@O
阅读全文
摘要:(解析器)DocumentBuilder.parse(File f) 将给定文件的内容解析为一个 XML 文档,并且返回一个新的 DOM Document 对象。 通过解析器 解析文档后得到的返回类型是Document接口类型的实现类 Document,Element是Node(节点)的子接口 DO
阅读全文
摘要:(function(a,b){console.log(a+","+b)})(1,2) 语法1:<script type="text/javascript"> <!-- document.write("hello,JavaScript"); --></script>语法2:<body onload="
阅读全文
摘要:windowhistory 前进后退location 地址栏document 文档内容 historyhistory.forward() //前进到下个页面history.back() //返回到上个页面 history.go(n); n为-1 返回上个页面n为1 前进下个页面n为0 刷新当前页面
阅读全文
摘要:private static Properties properties; properties.load(is); 报错 进入build path 在Libraries 修改jre Sun JDK1.6 解决问题
阅读全文
摘要:Eclipse-->Preferences MyEclipse--> Window -->Preferences 搜索关键词 context type 点击右边的Text,选择java Properties File File associatios: 添加文件格式 *.jsp Default en
阅读全文
摘要:配置信息: (mysql) jdbc.driver.class=com.mysql.jdbc.Driver (数据库驱动) jdbc.connection.url=jdbc:mysql://127.0.0.1:3306/sql (sql为数据库名) jdbc.connection.username=
阅读全文