摘要: Servlet过滤器 它能够对Servlet容器的请求和响应进行拦截和处理,并能生成请求和响应。 过滤器的配置方式: 1、通过web.xml配置过滤器 <filter> <filter-name>FilterName</filter-name>//过滤器的名称 <filter-class>packa 阅读全文
posted @ 2019-06-18 20:32 零度放纵 阅读(306) 评论(0) 推荐(0)
摘要: private int totalPageCount = 1;// 总页数 private int pageSize = 10;// 页面大小,即每页显示记录数 private int totalCount = 0;// 记录总数 private int currPageNo = 1;// 当前页码 阅读全文
posted @ 2019-06-18 19:52 零度放纵 阅读(584) 评论(0) 推荐(0)
摘要: 1、通过jQuery发起Ajax请求 setInterval(调用的方法,每个多少毫秒发起)url:发送请求的地址type:请求方式cache:缓存(false每次都清空缓存)error:请求失败success:请求后回调函数 2、通过原生的XmlHttpRequest发起请求 服务器端代码: 阅读全文
posted @ 2019-06-17 20:02 零度放纵 阅读(227) 评论(0) 推荐(0)
摘要: 1 public static void main(String[] args) { 2 // json演示序列化和反序列化 3 User user = new User(0,"测试","0000",1); 4 String str = JSON.toJSONString(user); 5 System.out.print... 阅读全文
posted @ 2019-06-17 19:40 零度放纵 阅读(113) 评论(0) 推荐(0)
摘要: jsp使用el和jstl 阅读全文
posted @ 2019-06-14 15:34 零度放纵 阅读(199) 评论(0) 推荐(0)
摘要: el表达式所有el表达式都是以${为起始,以}为结尾${session.user}可以取出session域中名为user的值等价于<%=session.getAttribute("user")%>${name}可以取出四大域内为name的值。重最小的范围开始找pageContext ->reques 阅读全文
posted @ 2019-06-14 13:08 零度放纵 阅读(160) 评论(0) 推荐(0)
摘要: 上传和下载需要一些jar包 commons-fileupload-1.3.1.jar commons-io-2.4.jar 上传界面fileUp.jsp 上传处理fileUp_do.jsp 下载界面fileDow.jsp 下载处理fileDow_do.jsp 注意:需要删除<%%>和<%%>之间的空 阅读全文
posted @ 2019-06-14 11:14 零度放纵 阅读(167) 评论(0) 推荐(0)
摘要: 1 // json演示序列化和反序列化 2 User user = new User(0,"测试","0000",1); 3 String str = JSON.toJSONString(user); 4 System.out.println(str); 5 String str1 = "{\"uid\":1,\"... 阅读全文
posted @ 2019-06-14 11:09 零度放纵 阅读(392) 评论(0) 推荐(0)
摘要: page类记录分页信息 用户操作类获取分页信息方法 jsp页面显示分页信息 阅读全文
posted @ 2019-06-13 22:19 零度放纵 阅读(1887) 评论(0) 推荐(0)
摘要: 连接池: tomcat连接池(jndi)dbcpc3p0druid ali tomcat连接池简单实现: 在tomcat的context.xml配置文件中添加(jnid)Java命名和目录接口: 配置如下 在配置项目的web.xml 现在可以再类中去获取连接了 阅读全文
posted @ 2019-06-13 20:57 零度放纵 阅读(2614) 评论(0) 推荐(0)