List of usage examples for org.springframework.web.servlet.mvc SimpleControllerHandlerAdapter SimpleControllerHandlerAdapter
SimpleControllerHandlerAdapter
From source file:com.puglieseweb.app.web.config.BlossomServletConfiguration.java
/** * Handler adapter for Controller interface style controllers. Required because these are used internally by the * pre-execution mechanism.// www . j a va2s .co m */ @Bean public HandlerAdapter controllerHandlerAdapter() { return new SimpleControllerHandlerAdapter(); }
From source file:org.displaytag.filter.DisplayTagSpringInterceptor.java
/** * @see HandlerInterceptor#preHandle(HttpServletRequest,HttpServletResponse, Object) */// w ww .j a va 2 s . co m public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if (request.getParameter(TableTagParameters.PARAMETER_EXPORTING) == null) { if (log.isDebugEnabled()) { log.debug(Messages.getString("ResponseOverrideFilter.parameternotfound")); //$NON-NLS-1$ } // don't intercept! return true; } BufferedResponseWrapper wrapper = new BufferedResponseWrapper12Impl(response); Map contentBean = new HashMap(4); if (buffer) { contentBean.put(TableTagParameters.BEAN_BUFFER, Boolean.TRUE); } request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY, contentBean); if (log.isDebugEnabled()) { log.debug("handler is " + handler); } HandlerAdapter handlerAdaptor = new SimpleControllerHandlerAdapter(); handlerAdaptor.handle(request, wrapper, handler); ExportDelegate.writeExport(response, request, wrapper); return false; }
From source file:org.kuali.rice.ksb.messaging.servlet.KSBDispatcherServlet.java
@Override protected HandlerAdapter getHandlerAdapter(Object handler) throws ServletException { if (handler instanceof HttpRequestHandler) { return new HttpRequestHandlerAdapter(); } else if (handler instanceof Controller) { Object unwrappedHandler = ClassLoaderUtils.unwrapFromProxy(handler); if (unwrappedHandler instanceof CXFServletControllerAdapter) { // TODO this just seems weird as this controller is initially null when it's created, does there need to be some synchronization here? ((CXFServletControllerAdapter) unwrappedHandler).setController(cxfServletController); }//from ww w . ja v a2s . c om return new SimpleControllerHandlerAdapter(); } throw new RiceRuntimeException("handler of type " + handler.getClass().getName() + " is not known and can't be used by " + KSBDispatcherServlet.class.getName()); }