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引擎调用
  • 相关阅读:
    桥接模式
    单例模式
    迭代器模式
    组合模式
    备忘录模式
    适配器模式
    状态模式
    观察者模式
    golang 字符串统计
    go bytes缓冲区使用介绍 -转自https://www.cnblogs.com/--xiaoyao--/p/5122138.html
  • 原文地址:https://www.cnblogs.com/netcorner/p/2912413.html
Copyright © 2011-2022 走看看