复旦大学:《高级Web技术》3-应用web_3-J2EE-组件-服务-通讯_教学课件PPT_servletandjsp

高级Web技术 Java 2 Enterprise Edition
高级Web技术 Java 2 Enterprise Edition

本次课程内容 Servlet and jsP overview Introduction to Servlets Request Response Session Tracking Introduction to JavaServer Pages
本次课程内容 ◼ Servlet and JSP Overview ◼ Introduction to Servlets ◼ Request ◼ Response ◼ Session Tracking ◼ Introduction to JavaServer Pages

Servlet and JsP Overview
Servlet and JSP Overview

J2EE Architecture An extensible Web technology that uses template data. Java Servlet A Java program that custom elements, scripting languages, and server-side extends the functionality of a Web Java objects to return dy namic content to a client server, generating dynamic content ypically the temp late data is HTML or XML elements. and interacting with Web clients Ty The client is often a web browser using a request-response paradigm Tools Application Programming Model Transactions Container Messaging Mail Java 2 SDK, Standard Edition CORBA RMI Database Naming/Directory
J2EE Architecture

Where is servlet and jsp Client-Side erver-Side Server-Side terprise resentation resentation Business Logic rmation Web EJB ystem Browser Container EJB Java JSP E DesKtoP Java Applicntion Servlet EJB other Device J2EE Platform Platform client Web Tier EJB Tier
Where is Servlet and JSP

Servlet definition Servlets are modules of Java code that run in a server application (hence the name Servlets", similar to Applets"on the client side to answer client requests. It is based on servlet APl and extendthefunctionalityofahttpserver. Servlets are not tied to a specific client-server protocol but they are most commonly used with Http and the word servlet"is oftenusedinthemeaningofhttpservlet Mapped to URLs and managed by container with a simple architecture Available and running on all major web servers and app servers Platform and server independent
Servlet Definition ◼ Servlets are modules of Java code that run in a server application (hence the name "Servlets", similar to "Applets” on the client side) to answer client requests. It is based on servlet API and extend the functionality of a HTTP server. ◼ Servlets are not tied to a specific client-server protocol but they are most commonly used with HTTP and the word "Servlet" is often used in the meaning of "HTTP Servlet". ◼ Mapped to URLs and managed by container with a simple architecture ◼ Available and running on all major web servers and app servers ◼ Platform and server independent

Servlet sample code PublicclasshelloservletextendshttpServlet publicvoiddoGet(httpServletrequestrequest Http servletrEsponse response response. setContentType( text/html") PrintWriter out response getWriter0 out println ( Hello World )
Servlet Sample Code

CGI and servlet CGI (Common Gateway Interface) Written in cc++, visual Basic and perl A CGi program and probably also an extensive runtime system or interpreter) needs to be loaded and started for each CGI request
CGI and Servlet ◼ CGI (Common Gateway Interface) ◼ Written in C, C++, Visual Basic and Perl ◼ A CGI program (and probably also an extensive runtime system or interpreter) needs to be loaded and started for each CGI request

CGI and servlet Servlets written in java A Servlet does not run in a separate process. This removes the overhead of creating a new process for each request. There is only a single instance which answers all requests concurrently. this saves memory and allows a servlet to easily manage persistent data. A servlet can be run by a servlet engine in a restrictive Sandbox Gust like an applet runs in a Web browser's Sandbox which allows secure use of untrusted and potentially harmful Servlets
CGI and Servlet ◼ Servlets ◼ Written in Java. ◼ A Servlet does not run in a separate process. This removes the overhead of creating a new process for each request. ◼ There is only a single instance which answers all requests concurrently. This saves memory and allows a Servlet to easily manage persistent data. ◼ A Servlet can be run by a Servlet Engine in a restrictive Sandbox (just like an Applet runs in a Web Browser's Sandbox) which allows secure use of untrusted and potentially harmful Servlets

CGI and servlet Request cAll Child for CAll Request CG12 CGI Based Child for cg12 Webserver Request cgIl Child for CAll Request Servlet Servlet Based Webserver Request servlet Servlet Request Servlet Servlet
CGI and Servlet
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《高级Web技术》3-应用web_3-J2EE-组件-服务-通讯_教学课件PPT_Java Naming and Directory Interface JNDI.ppt
- 复旦大学:《高级Web技术》3-应用web_3-J2EE-组件-服务-通讯_教学课件PPT_Java Message Service JMS.ppt
- 复旦大学:《高级Web技术》3-应用web_3-J2EE-组件-服务-通讯_教学课件PPT_javabean-javamail-tld-jdbc.ppt
- 复旦大学:《高级Web技术》3-应用web_2-J2EE概述_教学课件PPT_J2EE overview.ppt
- 复旦大学:《高级Web技术》3-应用web_1-分布式计算与中间件概述_教学课件PPT_分布式计算与中间件概述.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_6-XML应用_[07级]教学课件PPT_xml应用.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_5-XML链接语言-XLL_[07级]教学课件PPT_xml-xll.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_4-XML程序接口-java&XML_[07级]教学课件PPT_xml-java.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_3-XML转换标准-XSL_[07级]教学课件PPT_xml-xsl.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_2-XML描述和验证规范-DTD-SCHEMA_[07级]教学课件PPT_xml-schema.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_2-XML描述和验证规范-DTD-SCHEMA_[07级]教学课件PPT_xml-dtd.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_1-XML基础—概述与语法_[07级]教学课件PPT_XML改错.ppt
- 复旦大学:《高级Web技术》2-Web上的数据标准-XML_1-XML基础—概述与语法_[07级]教学课件PPT_XML基础—概述与语法.ppt
- 复旦大学:《高级Web技术》1-webapp outline_[07级]教学课件PPT_web app outline.ppt
- 复旦大学:《高级Web技术》0-class intro_[07级]教学课件PPT_class introduction.ppt
- 《高级Web技术》参考资料:4-RESTFUL WEBSERVICES_4-Service web_introduction_of_rest_and_restful_webservices.ppt
- 《高级Web技术》参考资料:3-应用web_5-J2EE框架_阅读参考资料_实用j2ee设计模式编程指南(PDF)_实用J2EE设计模式编程指南.pdf
- 《高级Web技术》参考资料:3-应用web_5-J2EE框架_阅读参考资料_Sun+J2EE+宠物店_宠物店.doc
- 《高级Web技术》参考资料:3-应用web_5-J2EE框架_阅读参考资料_Sun+J2EE+宠物店_原始码追踪记(3)-商业逻辑处理.pdf
- 《高级Web技术》参考资料:3-应用web_5-J2EE框架_阅读参考资料_Sun+J2EE+宠物店_原始码追踪记(2)-Model 篇.pdf
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB基础-1-概述.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB基础-2-体系结构.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB基础-3-主要接口设计原则.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB开发-4-创建Session EJB.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB开发-5-编写Entity Bean.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB开发-6-创建客户程序.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB开发-7-部署EJB应用.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB高级-10-安全性控制..ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB高级-11-JavaEE 5、EJB3.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB高级-8-资源管理与EJB环境.ppt
- 复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB高级-9-事务处理.ppt
- 复旦大学:《高级Web技术》3-应用web_5-J2EE框架_spring_教学课件PPT_Introduction to Spring Framework.ppt
- 复旦大学:《高级Web技术》3-应用web_5-J2EE框架_教学课件PPT_J2EE模式与框架struts(J2EE模式与框架简介).ppt
- 复旦大学:《高级Web技术》4-Service web_1-SOA和WS概述_[07级]教学课件PPT_SOA Introduction.ppt
- 复旦大学:《高级Web技术》4-Service web_1-SOA和WS概述_[07级]教学课件PPT_Web Service概述.ppt
- 复旦大学:《高级Web技术》4-Service web_2-soap&wsdl&uddi_[07级]教学课件PPT_SOAP.ppt
- 复旦大学:《高级Web技术》4-Service web_2-soap&wsdl&uddi_[07级]教学课件PPT_Tomcat与SOAP&AXIS集成.ppt
- 复旦大学:《高级Web技术》4-Service web_2-soap&wsdl&uddi_[07级]教学课件PPT_UDDI.ppt
- 复旦大学:《高级Web技术》4-Service web_2-soap&wsdl&uddi_[07级]教学课件PPT_WSDL.ppt
- materials_5-语义web_Web Ontology Language:OWL.pdf