zoukankan      html  css  js  c++  java
  • javax.servlet.Servlet接口

    < DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>


    servlet抽象集是javax.servlet.Servlet接口,它规定了必须由Servlet类实现由servlet引擎识别和管理的方法集。
    Servlet接口的基本目标是提供生命期方法init()、service()和destroy()方法。


    servlet接口中的方法       
    void init(ServletConfit config)throws ServletException     在servlet被载入后和实施服务前由servlet引擎进行?次性调用。如果init()产生溢出UnavailableException,则servle退出服务。       
    ServletConfig getServletConfig()     返回传递到servlet的init()方法的ServletConfig对象       
    void service(ServletRequest request, ServletResponse response)throws ServletException,IOException     处理request对象中描述的请求,使用response对象返回请求结果       
    String getServletInfo()         返回描述servlet的一个字符串       
    void destory()         当servlet将要卸载时由servlet引擎调用
  • 相关阅读:
    C++的类继承方式
    leetcode面试题53
    leetcode56 区间合并
    epoll源码分析
    C++11 lambda表达式是如何实现的?
    用 CPI 火焰图分析 Linux 性能问题
    cache
    mysql insert锁机制
    MySQL 各级别事务的实现机制
    cache line 伪共享
  • 原文地址:https://www.cnblogs.com/netcorner/p/2912413.html
Copyright © 2011-2022 走看看