类 HttpRequestHandlerServlet
- java.lang.Object
- javax.servlet.GenericServlet
- javax.servlet.http.HttpServlet
- org.springframework.web.context.support.HttpRequestHandlerServlet
- 所有已实现的接口:
Serializable,Servlet,ServletConfig
public class HttpRequestHandlerServlet extends HttpServlet
Simple HttpServlet that delegates to anHttpRequestHandlerbean defined in Spring's root web application context. The target bean name must match the HttpRequestHandlerServlet servlet-name as defined inweb.xml.This can for example be used to expose a single Spring remote exporter, such as
HttpInvokerServiceExporterorHessianServiceExporter, per HttpRequestHandlerServlet definition. This is a minimal alternative to defining remote exporters as beans in a DispatcherServlet context (with advanced mapping and interception facilities being available there).- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
HttpRequestHandler,DispatcherServlet, 序列化表格
构造器概要
构造器 构造器 说明 HttpRequestHandlerServlet()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidinit()A convenience method which can be overridden so that there's no need to callsuper.init(config).protected voidservice(HttpServletRequest request, HttpServletResponse response)Receives standard HTTP requests from the publicservicemethod and dispatches them to thedoXXX methods defined in this class.从类继承的方法 javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
从类继承的方法 javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
构造器详细资料
HttpRequestHandlerServlet
public HttpRequestHandlerServlet()
方法详细资料
init
public void init() throws ServletException
从类复制的说明:javax.servlet.GenericServletA convenience method which can be overridden so that there's no need to callsuper.init(config).Instead of overriding
GenericServlet.init(ServletConfig), simply override this method and it will be called byGenericServlet.init(ServletConfig config). TheServletConfigobject can still be retrieved viaGenericServlet.getServletConfig().- 覆盖:
init在类中GenericServlet- 抛出:
ServletException- if an exception occurs that interrupts the servlet's normal operation
service
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
从类复制的说明:javax.servlet.http.HttpServletReceives standard HTTP requests from the publicservicemethod and dispatches them to thedoXXX methods defined in this class. This method is an HTTP-specific version of theServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)method. There's no need to override this method.- 覆盖:
service在类中HttpServlet- 参数:
request- theHttpServletRequestobject that contains the request the client made of the servletresponse- theHttpServletResponseobject that contains the response the servlet returns to the client- 抛出:
ServletException- if the HTTP request cannot be handledIOException- if an input or output error occurs while the servlet is handling the HTTP request- 另请参阅:
Servlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)