Spring MVC MCQs with answers Page - 3

Here, you will find a collection of MCQ questions on Spring MVC. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used by Spring MVC to render views?

  • (A) View
  • (B) Resolver
  • (C) Handler
  • (D) Renderer

S

Satya • 3.38K Points
Extraordinary

Q. Which ViewResolver is commonly used with JSP pages?

  • (A) BeanNameViewResolver
  • (B) InternalResourceViewResolver
  • (C) XmlViewResolver
  • (D) ContentNegotiatingViewResolver

S

Satya • 3.38K Points
Extraordinary

Q. What is the role of HandlerAdapter in Spring MVC?

  • (A) It resolves views
  • (B) It executes controller methods
  • (C) It manages database connections
  • (D) It stores session data

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used to validate a form object in Spring MVC?

  • (A) @Valid
  • (B) @Bean
  • (C) @Autowired
  • (D) @Component

S

Satya • 3.38K Points
Extraordinary

Q. Which object stores user-specific data across multiple requests?

  • (A) Model
  • (B) HttpSession
  • (C) ServletContext
  • (D) ApplicationContext

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used for dependency injection in Spring MVC?

  • (A) @Autowired
  • (B) @Override
  • (C) @Deprecated
  • (D) @SuppressWarnings

S

Satya • 3.38K Points
Extraordinary

Q. Which component converts HTTP request body into Java object?

  • (A) ViewResolver
  • (B) HandlerMapping
  • (C) HttpMessageConverter
  • (D) BeanFactory

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used to read JSON data from request body?

  • (A) @RequestBody
  • (B) @ResponseBody
  • (C) @ModelAttribute
  • (D) @PathVariable

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used to specify the base URL at class level?

  • (A) @Component
  • (B) @RequestMapping
  • (C) @Bean
  • (D) @Configuration

S

Satya • 3.38K Points
Extraordinary

Q. What is the default scope of a Spring MVC controller bean?

  • (A) Prototype
  • (B) Request
  • (C) Session
  • (D) Singleton

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ