- 1、本文档共322页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
JAVA培训讲义研讨
* * * * * * * * * * * * * * * * * Servlet Life Cycle Overview ? The Web container manages the life cycle of a servlet instance. These methods should not be called by your code. ? You can provide an implementation of these methods to manipulate the servlet instance or the resources it depends on. * The init Life Cycle Method ? The init method is called by the Web container when the servlet instance is first created. ? The Servlet specification guarantees that no requests will be processed by this servlet until the init method has completed. ? Override the init method when: ? You need to create or open any servlet-specific resources that you need for processing user requests ? You need to initialize the state of the servlet * The service Life Cycle Method ? The service method is called by the Web container to process a user request. ? The HttpServlet class implements the service method by dispatching to doGet, doPost, and so on depending on the HTTP request method (GET, POST, and so on). * * The ServletConfig API * The ServletConfig API ? The GenericServlet class implements the ServletConfig interface, which provides subclasses with direct access to the config delegate. ? The Web container calls the init(config) method, which is handled by the GenericServlet class. This method stores the config object (delegate) and then calls the init() method. ? Override the init() method in your servlet class. Do not override the init(config) method. ? The getInitParameter method provides the servlet with access to the initialization parameters for that servlet instance. These parameters are stored in the deployment descriptor. * * * * * * * 28 29 30 32 33 34 35 42 43 44 45 * * * * * * * * * * * * * * * * Servlets on theWeb Server Deployment diagram of a Web server with a Web container: * Execution of Java Servlets How servlets work with one request: * Execution of Java Servlets How servlets work with many requests: * Advantages and Disadvantages of Java Servlets ? Servlet
您可能关注的文档
- 3.12 电现象研讨.ppt
- 3.1.电现象 公开课精品研讨.pptx
- 3.1圆的对称性研讨.ppt
- 3.1地球的卫星—月球研讨.ppt
- 3.1放射性的发现研讨.ppt
- 6第六章 单元组相图及纯晶体的凝固(6h)研讨.ppt
- 3.1桥梁地震反应分析研讨.ppt
- 6沟通心理学研讨.ppt
- 7-计算智能研讨.ppt
- 711 地球的运动(公开课)研讨.pptx
- 精品解析:2025年广东省中考语文真题(解析版).pdf
- 元宇宙技术引领教育管理升级:2025年其在学生心理辅导中的应用.docx
- 2025特种作业煤矿安全作业试题及参考答案详解【B卷】.docx
- 医疗影像诊断人工智能在影像引导下的手术应用2025年研究报告.docx
- 宠物医院系统的管理设计与实现.docx
- 艺术培训市场分析2025年在线平台运营策略研究报告.docx
- 2025-2026学年高中物理必修 第三册粤教版(2019)教学设计合集.docx
- 2025特种作业煤矿安全作业试题【新题速递】附答案详解.docx
- 元宇宙技术引领教育管理变革:2025年行业研究报告解读.docx
- 元宇宙技术推动教育管理革新:2025年校园智能化解决方案解析.docx
最近下载
- 冠心病合并房颤的抗凝抗栓策略.ppt VIP
- 副高中医护理试题及答案.docx
- 员工职业发展通道设计课程.ppt VIP
- 注册安全工程师中级其他安全生产专业实务(电气安全)模拟试卷3.pdf VIP
- VDI2230高强度螺栓连接的系统计算中文版.pdf VIP
- 汉威KB500可燃气体报警控制器使用说明书.pdf
- 2024-2030全球摩托车和机车头盔行业调研及趋势分析报告.docx
- 2024-2030全球全面式蓝牙摩托车头盔行业调研及趋势分析报告.docx
- 神木市东安煤业有限公司煤炭资源整合项目(0.60Mt_a)(重大变动)环境影响报告书.pdf VIP
- (高清版)DB11∕T 1702-2019 生活饮用水样品采集技术规范.pdf VIP
文档评论(0)