Spring MVC very confused about controller mappings?

In your first snippet you missed the leading It should be something like RequestMapping(value="/create", method=RequestMethod. GET).

In your first snippet you missed the leading /. It should be something like @RequestMapping(value="/create", method=RequestMethod. GET) Now you should change your third snippet to this, @Controller public class AlertsController { @RequestMapping(value="/profile/alerts/create", method=RequestMethod.

GET) public void create(HttpServletRequest request, Model model) { } } Moreover, as you are making your method void which expect the DispatcherServlet to fall back on the default view name of "profile/alerts/create". And then it is combined with a suitable view resolver. For example, And there you got 404, may be.

I had the view resolver, and this did work. The weird thing is that I thought the @RequestMapping annotations on methods were refinements of the class-level annotation; it seems not. – davetron5000 Nov 28 '09 at 14:45.

You can do url matching on both the class annotation and more finegrained on the methods. The class level annotation gets prepended to the method level annotation @Controller @RequestMapping(value = "/admin") public class AdminController { @RequestMapping(value = "/users", method = RequestMethod. GET) /* matches on /admin/users */ public string users() { ... } } It's very close to your original third snippet except you forgot a leading /.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions