@Override @Nullable public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return ((Controller) handler).handleRequest(request, response); }
@Override @Nullable public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return ((Controller) handler).handleRequest(request, response); }
@Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { String path = request.getServletPath(); String internalPath = path.replaceAll(xmlMarker, ""); Controller controller = (Controller) getApplicationContext().getBean(internalPath); if (controller != null) { ModelAndView modelAndView = controller.handleRequest(request, response); if (modelAndView.getModel() != null) { TransportableModel tm = new TransportableModel(); tm.putAll(modelAndView.getModel()); XStream xstream = new XStream(); xstream.allowTypesByWildcard(new String[] {"psibrobe.controllers.**"}); XStream.setupDefaultSecurity(xstream); xstream.toXML(tm, response.getWriter()); } } return null; } }
@Override public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return ((Controller) handler).handleRequest(request, response); }
public Map<String, Object> handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView modelAndView = controller.handleRequest(request, response); if (modelAndView.getView() instanceof RedirectView) { RedirectView view = (RedirectView)modelAndView.getView(); response.sendRedirect(view.getUrl()); return new HashMap<>(); } else { return modelAndView.getModel(); } }
ModelAndView modelAndView = handler.handleRequest(request, response);