Half Diminished
Half Diminished

Reputation: 193

Gwt Controller With Annotation Approach

I already integrated GWT with Spring MVC by implementing the Controller which is called by DispatcherServlet using SimpleUrlHandlerMapping.

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

I want to use the new approach with the annotation @Controller, like below:

@Controller
public class GwtRpcController extends RemoteServiceServlet implements
        ServletContextAware {

}

In this case there will be no handleRequest method, where should I do super.doPost(request, response); ?

Upvotes: 0

Views: 588

Answers (1)

Vladimir Korobkov
Vladimir Korobkov

Reputation: 619

See annotated web mvc controllers in spring 2.5

You should not to do doPost/doGet manually, just define controller method with corresponding parameters, return value and annonations for url mapping.

Upvotes: 0

Related Questions