I am using Spring MVC 3 and am having an issue with a URL mapping. I have a method
@Controller
public class DocumentController {
@RequestMapping( value="/docs/pupil/classes/{courseCategoryType}", method=RequestMethod.GET )
public ModelAndView listClassesForPupil( @PathVariable("courseCategoryType") final String courseCategoryType ){
System.err.print( "\n\n\n\t\t--- XXXXX ---\n\n\n" );
}
}
I am trying to use the Spring URI template syntax, and I know that is getting mapped because in console I see:
11:22:12,108 INFO DefaultAnnotationHandlerMapping:411 - Mapped URL path [/docs/pupil/classes/{courseCategoryType}] onto handler 'documentController'
11:22:12,108 INFO DefaultAnnotationHandlerMapping:411 - Mapped URL path [/docs/pupil/classes/{courseCategoryType}.*] onto handler 'documentController'
11:22:12,108 INFO DefaultAnnotationHandlerMapping:411 - Mapped URL path [/docs/pupil/classes/{courseCategoryType}/] onto handler 'documentController'
However, when I enter the URLhttps://localhost/docs/pupil/classes/ACADEMIC
in browser I get a 404 error and I do not see anything printed out in the console. I replaced the print out code that just throws an exception, and it didn't seem to get thrown either. A coworker suggested there should be a way of viewing how the URL resolution is being done but a Google search didn't seem to turn up anything.
Any suggestions as how to debug this?