Web MVC interview questions

27 real Web MVC questions from the Spring bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is @RestController?

Junior
  1. A.a shortcut annotation routing HTTP GET requests for a given path to a handler method
  2. B.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  3. C.an annotation binding a query-string or form field to a handler method parameter
  4. D.an annotation equal to combining the web controller stereotype with body serialization on every handler method
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.@RestController — an annotation equal to combining the web controller stereotype with body serialization on every handler method
  2. B.@RestController — an annotation that deserializes the incoming HTTP payload into a method parameter object
  3. C.@RestController — a shortcut annotation routing HTTP GET requests for a given path to a handler method
  4. D.@RestController — an annotation binding a query-string or form field to a handler method parameter
Reveal the answer + AI explanation — free account

4. What is @Controller?

Junior
  1. A.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  2. B.an annotation binding a query-string or form field to a handler method parameter
  3. C.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  4. D.an annotation binding a templated URI segment to a handler method parameter
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.@Controller — an annotation binding a templated URI segment to a handler method parameter
  2. B.@Controller — a stereotype for web request handlers whose methods typically return view names for server-side rendering
  3. C.@Controller — a wrapper giving full control over the HTTP response including status code, headers, and body
  4. D.@Controller — an annotation binding a query-string or form field to a handler method parameter
Reveal the answer + AI explanation — free account

7. What is @RequestMapping?

Mid
  1. A.the front controller that receives all requests and delegates them to the appropriate handlers
  2. B.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  3. C.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  4. D.the general annotation that maps HTTP requests to handler methods by path, method, headers, and params
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.@RequestMapping — an annotation binding a query-string or form field to a handler method parameter
  2. B.@RequestMapping — the general annotation that maps HTTP requests to handler methods by path, method, headers, and params
  3. C.@RequestMapping — an annotation binding a templated URI segment to a handler method parameter
  4. D.@RequestMapping — a shortcut annotation routing HTTP GET requests for a given path to a handler method
Reveal the answer + AI explanation — free account

10. What is @GetMapping?

Junior
  1. A.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  2. B.a shortcut annotation routing HTTP GET requests for a given path to a handler method
  3. C.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  4. D.an annotation binding a templated URI segment to a handler method parameter
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. A.@GetMapping — a stereotype for web request handlers whose methods typically return view names for server-side rendering
  2. B.@GetMapping — a shortcut annotation routing HTTP GET requests for a given path to a handler method
  3. C.@GetMapping — the general annotation that maps HTTP requests to handler methods by path, method, headers, and params
  4. D.@GetMapping — an annotation that deserializes the incoming HTTP payload into a method parameter object
Reveal the answer + AI explanation — free account

13. What is @PathVariable?

Junior
  1. A.a wrapper giving full control over the HTTP response including status code, headers, and body
  2. B.a shortcut annotation routing HTTP GET requests for a given path to a handler method
  3. C.an annotation binding a templated URI segment to a handler method parameter
  4. D.an annotation binding a query-string or form field to a handler method parameter
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Junior
  1. A.@PathVariable — an annotation binding a templated URI segment to a handler method parameter
  2. B.@PathVariable — an annotation equal to combining the web controller stereotype with body serialization on every handler method
  3. C.@PathVariable — the general annotation that maps HTTP requests to handler methods by path, method, headers, and params
  4. D.@PathVariable — the front controller that receives all requests and delegates them to the appropriate handlers
Reveal the answer + AI explanation — free account

16. What is @RequestParam?

Junior
  1. A.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  2. B.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  3. C.an annotation that deserializes the incoming HTTP payload into a method parameter object
  4. D.an annotation binding a query-string or form field to a handler method parameter
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Junior
  1. A.@RequestParam — an annotation binding a query-string or form field to a handler method parameter
  2. B.@RequestParam — the front controller that receives all requests and delegates them to the appropriate handlers
  3. C.@RequestParam — a shortcut annotation routing HTTP GET requests for a given path to a handler method
  4. D.@RequestParam — a wrapper giving full control over the HTTP response including status code, headers, and body
Reveal the answer + AI explanation — free account

19. What is @RequestBody?

Mid
  1. A.the front controller that receives all requests and delegates them to the appropriate handlers
  2. B.an annotation that deserializes the incoming HTTP payload into a method parameter object
  3. C.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  4. D.an annotation binding a templated URI segment to a handler method parameter
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Mid
  1. A.@RequestBody — an annotation equal to combining the web controller stereotype with body serialization on every handler method
  2. B.@RequestBody — an annotation that deserializes the incoming HTTP payload into a method parameter object
  3. C.@RequestBody — an annotation binding a templated URI segment to a handler method parameter
  4. D.@RequestBody — the front controller that receives all requests and delegates them to the appropriate handlers
Reveal the answer + AI explanation — free account

22. What is ResponseEntity?

Mid
  1. A.an annotation binding a query-string or form field to a handler method parameter
  2. B.a stereotype for web request handlers whose methods typically return view names for server-side rendering
  3. C.a wrapper giving full control over the HTTP response including status code, headers, and body
  4. D.an annotation equal to combining the web controller stereotype with body serialization on every handler method
Reveal the answer + AI explanation — free account

24. Which statement is correct?

Mid
  1. A.ResponseEntity — the front controller that receives all requests and delegates them to the appropriate handlers
  2. B.ResponseEntity — an annotation that deserializes the incoming HTTP payload into a method parameter object
  3. C.ResponseEntity — a shortcut annotation routing HTTP GET requests for a given path to a handler method
  4. D.ResponseEntity — a wrapper giving full control over the HTTP response including status code, headers, and body
Reveal the answer + AI explanation — free account

25. What is DispatcherServlet?

Mid
  1. A.an annotation binding a templated URI segment to a handler method parameter
  2. B.the front controller that receives all requests and delegates them to the appropriate handlers
  3. C.an annotation equal to combining the web controller stereotype with body serialization on every handler method
  4. D.a stereotype for web request handlers whose methods typically return view names for server-side rendering
Reveal the answer + AI explanation — free account

27. Which statement is correct?

Mid
  1. A.DispatcherServlet — a wrapper giving full control over the HTTP response including status code, headers, and body
  2. B.DispatcherServlet — the front controller that receives all requests and delegates them to the appropriate handlers
  3. C.DispatcherServlet — an annotation that deserializes the incoming HTTP payload into a method parameter object
  4. D.DispatcherServlet — the general annotation that maps HTTP requests to handler methods by path, method, headers, and params
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Web MVC free