Is it possible to reuse the predefined controllers, like the SimpleFormController, with annotation configured spring mvc projects?
I downloaded a project that looks like what I want; however, the writer did not use the annotations that are predefined in Spring.
The controller of the downloaded project:
package net.sourceforge.sannotations.example2;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sourceforge.sannotations.annotation.Bean;
import net.sourceforge.sannotations.annotation.UrlMapping;
/**
* User: Urubatan Date: 24/10/2006 Time: 08:49:09
*/
@Bean
@UrlMapping("/test")
public class ExampleController implements Controller {
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
return new ModelAndView("example", "message", request.getParameter("tainted"));
}
}
The project is downloaded from: http://sannotations.sourceforge.net/examples.html