1 16 17 package org.springframework.web.servlet.handler; 18 19 import javax.servlet.Servlet ; 20 import javax.servlet.http.HttpServletRequest ; 21 import javax.servlet.http.HttpServletResponse ; 22 23 import org.springframework.web.servlet.HandlerAdapter; 24 import org.springframework.web.servlet.ModelAndView; 25 26 54 public class SimpleServletHandlerAdapter implements HandlerAdapter { 55 56 public boolean supports(Object handler) { 57 return (handler instanceof Servlet ); 58 } 59 60 public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) 61 throws Exception { 62 63 ((Servlet ) handler).service(request, response); 64 return null; 65 } 66 67 public long getLastModified(HttpServletRequest request, Object handler) { 68 return -1; 69 } 70 71 } 72 | Popular Tags |