Web MVC interview questions

27 Web MVC questions from the Spring bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

2. Which term means: "an annotation equal to combining the web controller stereotype with body serialization on every handler method"?

Junior
  1. A.@RestController
  2. B.@RequestParam
  3. C.@Controller
  4. D.@RequestMapping

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which term means: "a stereotype for web request handlers whose methods typically return view names for server-side rendering"?

Junior
  1. A.@RequestMapping
  2. B.@RequestBody
  3. C.@Controller
  4. D.DispatcherServlet

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which term means: "the general annotation that maps HTTP requests to handler methods by path, method, headers, and params"?

Mid
  1. A.@RestController
  2. B.DispatcherServlet
  3. C.@Controller
  4. D.@RequestMapping

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

11. Which term means: "a shortcut annotation routing HTTP GET requests for a given path to a handler method"?

Junior
  1. A.@RestController
  2. B.DispatcherServlet
  3. C.@GetMapping
  4. D.@RequestParam

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which term means: "an annotation binding a templated URI segment to a handler method parameter"?

Junior
  1. A.DispatcherServlet
  2. B.@PathVariable
  3. C.@RequestMapping
  4. D.@RestController

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

17. Which term means: "an annotation binding a query-string or form field to a handler method parameter"?

Junior
  1. A.ResponseEntity
  2. B.@RestController
  3. C.@RequestParam
  4. D.@GetMapping

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

20. Which term means: "an annotation that deserializes the incoming HTTP payload into a method parameter object"?

Mid
  1. A.@RequestBody
  2. B.@Controller
  3. C.@RequestParam
  4. D.@GetMapping

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

23. Which term means: "a wrapper giving full control over the HTTP response including status code, headers, and body"?

Mid
  1. A.@Controller
  2. B.@RestController
  3. C.ResponseEntity
  4. D.@PathVariable

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

26. Which term means: "the front controller that receives all requests and delegates them to the appropriate handlers"?

Mid
  1. A.@RequestBody
  2. B.ResponseEntity
  3. C.DispatcherServlet
  4. D.@RequestParam

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Web MVC question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers