Hi
I have whats probably a very simple issue but not sure what I'm doing wrong I have added a method to a controller based on the RSVP tutorial. Its like this:
For some reason this just does not work when trying to create a user I get the following stack trace:Code:@RequestMapping(method = RequestMethod.POST) public String post(@ModelAttribute("AppUser") AppUser appUser, ModelMap modelMap) { if (appUser.getId() == null) { appUser.persist(); if (appUser.getEmail().length() > 0) { sendMessage("a valid email address", "SoccerScene Account has been created", appUser.getEmail(), "Thanks for joining the site your username is " + appUser.getUsername() + "."); } } else { appUser.merge(); } return "thanks"; }
Any ideas is there some security setting I am missing?Code:2010-07-16 21:23:48,241 [http-8080-6] DEBUG org.springframework.web.servlet.DispatcherServlet - Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'uncaughtException'; model is {exception=org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported} org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodResolver.resolveHandlerMethod(AnnotationMethodHandlerAdapter.java:600) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:416) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
Thanks


Reply With Quote
