b

DefaultServletHttpRequestHandler 본문

spring framework

DefaultServletHttpRequestHandler

dev.bistro 2013. 2. 1. 09:22


Source Link

anyframe document Link


* @author Jeremy Grelle 

* @author Juergen Hoeller 

* @since 3.0.4


public void handleRequest(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {


RequestDispatcher rd = this.servletContext.getNamedDispatcher(this.defaultServletName);

if (rd == null) {

throw new IllegalStateException("A RequestDispatcher could not be located for the default servlet '" +

this.defaultServletName +"'");

}

rd.forward(request, response);

}


<mvc:default-servlet-handler/> 의 실제 구현체, DispatcherServlet이 제어하지 못하는 리소스를 만나면, 서버의 디폴트 서블릿으로 요청을 넘긴다. 



Comments