互联网开发技术第六讲Web技术.ppt
《互联网开发技术第六讲Web技术.ppt》由会员分享,可在线阅读,更多相关《互联网开发技术第六讲Web技术.ppt(33页珍藏版)》请在三一办公上搜索。
1、互联网开发技术Internet Systems Development Technologies,蔡 剑,Ph.D.Assistant Professor in Management Science and E-BusinessGuanghua School of ManagementPeking University,本讲内容,Web层技术(II)Servlet 的新功能JSP 技术About The Course Project:Proposal due one week after midtermSchedule meetings with groups next week About
2、The Midterm:Time:10/31(First 1.5 hours)Questions:choices,analysisCovers lecture 1-6(book p1-208),Review:J2EE Framework,Review:Servlet Process,Review:Collaboration,A Context is the Domain of An Application,Context,http:/yourip:8080/icamples/password,http:/yourip:8080/jsp-examples/*,Servlets Call Each
3、 Other,Get RequestDispatcher from HttpServletRequest:RequestDispatcher desp=req.getRequestDispatcher(“/target”)2.Get RequestDispatcher from ServletContext:ServletContext context=req.getSession().getServletContext()RequestDispatcher desp=context.getRequestDispatcher(“/target”)3.Get ServletContext for
4、 another application,then get RequestDispatcher:ServletContext context2=context.getContext(/icwork);RequestDispatcher desp=context2.getRequestDispatcher(“/target”);,To Load Another Servlet,despatcher.forward(req,resp);response.sendRedirect(targetURL);Difference?,HTTP/1.1 200 OK Content-Type:text/htm
5、l Transfer-Encoding:chunked Date:Thu,17 Oct 2002 20:42:53 GMT Server:Apache Coyote HTTP/1.1 Connector48f,HTTP/1.1 302 Moved Temporarily Content-Type:text/html Location:http:/Transfer-Encoding:chunked Date:Thu,17 Oct 2002 20:40:23 GMT Server:Apache Coyote HTTP/1.1 Connect2d8 Java Web Services Develop
6、er,Filters,Filter Functions,对网络请求进行分析,对输入数据进行预处理阻止请求和响应的进行根据功能改动请求的头信息和数据体.根据功能改动响应的头信息和数据体.和其他网络资源协作,Filter Chain,Filter Setup in Web.xml,filter.jpgSimpleFilterASimpleFilter The first filter samplejwadbook.SimpleFilter param1 value1SimpleFilter/path/index.jsp,Filter Example,P109,Filter to Check Pas
7、sword,Security Filter,Action Listener,serlvet的事件监听器接口能够处理ServletContext,HttpSession,ServletRequest的生命周期和属性变化事件,Data Base Connection,Database,SQL,Data resource,JDBC Connection,JDBC Connection,1.Use JDBC DriverPut driver.jar in/common/system/libClass.forName(“com.pointbase.jdbc.jdbcUniversalDriver”);2
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 互联网 开发 技术 第六 Web
链接地址:https://www.31ppt.com/p-6404973.html