It retrieves the complete path value before the @RequestMapping and @PathVariable values have been parsed.
It retrieves the partial path value (after "**") after the @RequestMapping and @PathVariable values have been parsed.
It retrieves the partial path value (after "**") before the @RequestMapping and @PathVariable values have been parsed.
What does the following code do?
@RequestMapping("/{id}/**")
public void foo(@PathVariable("id") int id, HttpServletRequest request) {
String restOfTheUrl = (String) request.getAttribute(
HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
...
}
Correct Answer:
It retrieves the partial path value (after "**") before the @RequestMapping and @PathVariable values have been parsed.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Spring MVC MCQ Questions