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

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

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

Parameters:

req - the HttpServletRequest object that contains the request the client made of the servlet

resp - the HttpServletResponse object that contains the response the servlet returns to the client

Throws:

java.io.IOException - if an input or output error occurs while the servlet is handling the HTTP request

ServletException - if the HTTP request cannot be handled

1.GenericServlet的类结构

javax.servlet

Class GenericServlet

java.lang.Object

javax.servlet.GenericServlet

All Implemented Inteces:

java.io.Serializable, Servlet, ServletConfig

Direct Known Subclasses:

HttpServlet

2.GenericServlet的介绍

Defines a generic, protocol-independent servlet. To write an HTTP servlet for use on the Web, extend HttpServlet instead.

GenericServlet implements the Servlet and ServletConfig inteces. GenericServlet may be directly extended by a servlet, although it's more common to extend a protocol-specific subclass such as HttpServlet.

GenericServlet makes writing servlets easier. It provides versions of the lifecycle methods init and destroy and of the methods in the ServletConfig intece. GenericServlet also implements the log method, declared in the ServletContext intece.

To write a generic servlet, you need only override the abstract service method

3.GenericServlet的ap

1) java.lang.String getServletName()

Returns the name of this servlet instance获取servlet配置时,声明在web应用内部使用的名字。

2)java.util.Enumeration<java.lang.String> getInitParameterNames()

Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters


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

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

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