Close
« Tutorial

Spring MVC - @RequestParam MCQ

0/13
0 ✓
0 ✗

1. What is the main purpose of the @RequestParam annotation in Spring MVC?

2. What is the default value of the required element in @RequestParam?

3. What happens when a required @RequestParam is missing from the request?

4. How can you make a @RequestParam optional so that a missing parameter does not cause an error?

5. What is the purpose of the defaultValue element in @RequestParam?

6. What effect does supplying a defaultValue have on the required setting of @RequestParam?

7. How can a controller method bind multiple different query parameters using @RequestParam?

8. What does a Map annotated with @RequestParam contain?

9. Does Spring MVC automatically convert a query parameter value to a non-String type (such as int) when using @RequestParam?

10. Which annotation is used to customize the date format when binding a date query parameter with @RequestParam?

11. Why does defining different @RequestParam names on methods with the same base URI cause an ambiguous mapping error?

12. How can ambiguity be resolved when two handler methods have the same URI path but expect different query parameters?

13. In @RequestParam, what is the relationship between the name attribute and the value attribute?

14. What is required for @RequestParam to bind a query parameter when the value element is omitted?

15. What value does a @RequestParam method argument receive if the request parameter is missing and required is set to false?

Join