2012-02-06 57 views
0

我已经通过实现由DispatcherServlet的使用SimpleUrlHandlerMapping建立所谓 控制器集成GWT与Spring MVC。GWT控制器具有注释的方法

 
public class GwtRpcController extends RemoteServiceServlet implements Controller, 
     ServletContextAware { 
     @Override 
    public ModelAndView handleRequest(HttpServletRequest request, 
      HttpServletResponse response) throws Exception { 
     super.doPost(request, response); 
     return null; 
    } 
} 

我想用这种新方法与注释@Controller,如下图所示:

 
@Controller 
public class GwtRpcController extends RemoteServiceServlet implements 
     ServletContextAware { 

} 

在这种情况下也不会有的handleRequest方法,我应该在哪里做super.doPost(request, response);

回答

0

annotated web mvc controllers in spring 2.5

你不应该这样做手工的doPost /的doGet,只是定义与相应的参数,返回值和annonations的URL映射控制器的方法。

+0

我使用控制器仅用于集成GWT和Spring。控制器在链接中调用相关的RemoteServiceServlet Impl:(http://technophiliac.wordpress.com/2008/08/24/giving-gwt-a-spring-in-its-step)我需要控制器像GWT的RemoteServiceServlet当doPost或以某种方式。 – 2012-02-06 07:16:36

相关问题