摘要: Ajax:异步 js and xml异步刷新:如果网页中某一个地方需要修改,异步刷新可以使:只刷新该需要修改的页面,而页面中其他地方保持不变 例如:百度搜索框、视频的点赞 实现:js: XMLHttpRequest对象 XMLHttpRequest对象的方法:open(方法名(提交方式get|pos 阅读全文
posted @ 2020-06-16 12:55 myyismyy 阅读(142) 评论(0) 推荐(0)
摘要: 钝化:内存->硬盘活化:硬盘->内存 session对象的四种状态监听绑定和解绑:HttpSessionBindingListener 不需要配置web.xmla.session.setAttribute("a",xxx) 将对象a【绑定】到session中b.session.removeAttri 阅读全文
posted @ 2020-06-15 16:07 myyismyy 阅读(292) 评论(0) 推荐(0)
摘要: 解决办法: 1.右键-Buid Path->Add Libraries 2. 3. 选中往下继续配置即可。 如果是只是删除servers后没有重新配置tomcat的话 点击window->show View->other 阅读全文
posted @ 2020-06-15 15:28 myyismyy 阅读(356) 评论(0) 推荐(0)
摘要: 监听器开发步骤:a.编写监听器,实现接口b.配置web.xml 监听对象:request session application a.监听对象的创建和销毁request:ServletRequestListenersession:HttpSessionListenerapplication:Serv 阅读全文
posted @ 2020-06-15 10:49 myyismyy 阅读(373) 评论(0) 推荐(0)
摘要: 过滤器:实现一个Filter接口init(),destroy()原理、执行时间同Servlet配置过滤器,类似servlet通过DoFilter()处理拦截,并且通过chain.doFilter(request,response)放行 filter映射 只拦截 访问MyServlet的请求 <url 阅读全文
posted @ 2020-06-14 15:52 myyismyy 阅读(105) 评论(0) 推荐(0)
摘要: JSTL:比EL更加强大需要引入两个jar包:jstl.jar standard.jar引入tablib:<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>其中prefix="c":前缀 核心标签库:通用便签库、条件标签库、 阅读全文
posted @ 2020-06-14 13:07 myyismyy 阅读(103) 评论(0) 推荐(0)
摘要: Expression Language,可以替代JSP页面中的Java代码 servlet(增加数据)->jsp(显示数据) 传统的 在JSP中用java代码显示数据的弊端:类型转换、需要处理null、代码参杂 >EL EL示例:${requestScope.student}<br/> ${requ 阅读全文
posted @ 2020-06-13 23:00 myyismyy 阅读(107) 评论(0) 推荐(0)
摘要: 下载:不需要依赖任何jar a.请求(地址a form),请求Servle b.Servlet通过文件的地址 将文件转为输入流 读到Servlet中 c.通过输出流,将刚才已经转为输入流的文件输出给用户注意:下载文件 需要设置两个响应头 response.addHeader("contentType 阅读全文
posted @ 2020-06-13 14:27 myyismyy 阅读(160) 评论(0) 推荐(0)
摘要: 上传文件a.引入两个jar apache:commons-fileupload.jar组件 commons-fileupload.jar组件依赖commons-io.jarb.代码前台jsp: <input type="file" name="spicture"/> 表单提交方式必须为post在表单 阅读全文
posted @ 2020-06-12 21:27 myyismyy 阅读(144) 评论(0) 推荐(0)
摘要: n (n-1)*10+1 n*10 select * from student where sno>=(n-1)*10+1 and sno<=n*10; 写法前提:必须id连续,否则无法满足每页显示10个数据select rownum,t* from student t where rownum>= 阅读全文
posted @ 2020-06-11 17:14 myyismyy 阅读(130) 评论(0) 推荐(0)