b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

aspnet responsewrite乱码_responsebody返回json_框架设response乱码(2)

电脑杂谈  发布时间:2017-03-10 09:15:41  来源:网络整理

3.Servlet的API

1)ServletConfig getServletConfig()

Returns a ServletConfig object, which contains initialization and startup parameters for this servlet. The ServletConfig object returned is the one passed to the init method.

Implementations of this intece are responsible for storing the ServletConfig object so that this method can return it. The GenericServlet class, which implements this intece, already does this.获得servletContext对象

1.javax.servlet.http Class HttpServlet 的类结构

java.lang.Object

javax.servlet.GenericServlet

javax.servlet.http.HttpServlet

All Implemented Inteces:

java.io.Serializable, Servlet, ServletConfig

2.HttpServlet

public abstract class HttpServlet Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A subclass of HttpServlet must override at least one method, usually one of these:

•doGet, if the servlet supports HTTP GET requests

•doPost, for HTTP POST requests

•doPut, for HTTP PUT requests

•doDelete, for HTTP DELETE requests

•init and destroy, to manage resources that are held for the life of the servlet

•getServletInfo, which the servlet uses to provide information about itself

3.HTTPServlet抽象类的API

1)protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException

Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class. This method is an HTTP-specific version of the Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method. There's no need to override this method.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-36808-2.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...