当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

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

资源类别:文库,文档格式:PPT,文档页数:94,文件大小:2.44MB,团购合买
◼ Servlet and JSP Overview ◼ Introduction to Servlets ◼ Request ◼ Response ◼ Session Tracking ◼ Introduction to JavaServer Pages
点击下载完整版文档(PPT)

高级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

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共94页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有