摘要: 遍历方式1: public static void printArray(int[] arr) { for(int x=0; x max); max = arr[x]; } return max; }最小值 p... 阅读全文
posted @ 2015-12-16 14:12 M-x 阅读(232) 评论(0) 推荐(0) 编辑
摘要: mysql中limit介绍利用mysql的limit,进行物理分页。select * from 表名 limit m,n;m是从0开始,代表是第几条记录 n代表显示多少条记录例如select * from person limit 4,10; 从第五条记录开始,显示10条.分页实现原理分析1.知道一... 阅读全文
posted @ 2015-12-16 13:29 M-x 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Java Web开发方案有多种可供选择,这里列举一些经典的开发模式进行横向比较,为Java Web的开发模式选择提供参考。除此之外还有好多方案(如Tapestry和Wicket等等)并不了解,这里就不列举了。model1:JSP+JAVABEAN开发模式: 特点:该模式将业务逻辑与页面表现进行分离,... 阅读全文
posted @ 2015-12-16 13:25 M-x 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 响应-字节流: response.setHeader("content-type", "text/html;charset=utf-8"); response.getOutputStream().write("中国".getBytes("utf-8")); 还可以使用下面的这种方式进行快速设置... 阅读全文
posted @ 2015-12-16 11:54 M-x 阅读(112) 评论(0) 推荐(0) 编辑
摘要: PageContext;ServletRequest;HttpSession;ServletContext;voidsetAttribute(Stringname,Objectvalue):用来存储一个对象,也可以称之为存储一个域属性,例如:servletContext.setAttribute(“... 阅读全文
posted @ 2015-12-16 00:19 M-x 阅读(132) 评论(0) 推荐(0) 编辑
摘要: ServletConfig config.getServletContext();GenericServlet this.getServletContext();HttpSession getServletContext()ServletContextEvent getServletContext(... 阅读全文
posted @ 2015-12-16 00:08 M-x 阅读(140) 评论(0) 推荐(0) 编辑