MCQOPTIONS
Saved Bookmarks
This section includes 22 Mcqs, each offering curated multiple-choice questions to sharpen your Spring knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Annotation which allows a controller’s field to be assigned using Spring Expression Language(SpEL) |
| A. | @Value |
| B. | @After |
| C. | @Default |
| D. | @None |
| Answer» B. @After | |
| 2. |
In a Spring MVC application, you can register one or more exception resolver beans in the web application context to resolve uncaught exceptions. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 3. |
The ContentNegotiatingViewResolver resolver first determines the media type for a request based on which of the following criteria? |
| A. | It checks a request path extension |
| B. | If a request path has an extension but no match can be found in the default mediaTypes section of the ContentNegotiatingViewResolver bean |
| C. | If no extension is present in a request path, the HTTP Accept header of the request is used |
| D. | All of the mentioned |
| Answer» E. | |
| 4. |
ContentNegotiatingViewResolver resolver configuration sets up the resolver to have the highest priority among all resolvers. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 5. |
Inspection of header is done by which of the following. |
| A. | InternalViewResolver |
| B. | ContentNegotiatingViewResolver |
| C. | ContentNegotiating |
| D. | InternalResolver |
| Answer» C. ContentNegotiating | |
| 6. |
Views that can’t be resolved by InternalResourceViewResolver. |
| A. | redirect |
| B. | redirect:prefix |
| C. | redirect:suffix |
| D. | all of the mentioned |
| Answer» B. redirect:prefix | |
| 7. |
ViewResolver which maps each view name tol an application’s directory. |
| A. | InternalViewResolver |
| B. | InternalResourceViewResolver |
| C. | InternalResolver |
| D. | None of the mentioned |
| Answer» C. InternalResolver | |
| 8. |
CONTENTNEGOTIATINGVIEWRESOLVER_RESOLVER_CONFIGURATION_SETS_UP_THE_RESOLVER_TO_HAVE_THE_HIGHEST_PRIORITY_AMONG_ALL_RESOLVERS.?$ |
| A. | True |
| B. | False |
| Answer» B. False | |
| 9. |
In a Spring MVC application, you can register one or more exception resolver beans in the web application context to resolve uncaught exceptions.$ |
| A. | True |
| B. | False |
| Answer» B. False | |
| 10. |
The ContentNegotiatingViewResolver resolver first determines the media type for a request based on which of the following criteria?$ |
| A. | It checks a request path extension |
| B. | If a request path has an extension but no match can be found in the default mediaTypes section of the ContentNegotiatingViewResolver bean |
| C. | If no extension is present in a request path, the HTTP Accept header of the request is used |
| D. | All of the mentioned |
| Answer» E. | |
| 11. |
Tag, used to define a location in which to place errors in case a form. |
| A. | form |
| B. | form:GET |
| C. | form:POST |
| D. | form:errors |
| Answer» E. | |
| 12. |
SpEL statements are recognizable. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 13. |
Annotation which allows a controller’s field to be assigned using Spring Expression Language(SpEL)$ |
| A. | @Value |
| B. | @After |
| C. | @Default |
| D. | @None |
| Answer» B. @After | |
| 14. |
To configure the exception mappings in the web application context. |
| A. | SimpleMappingExceptionResolver |
| B. | ExceptionResolver |
| C. | ExceptionViewResolver |
| D. | None of the mentioned |
| Answer» B. ExceptionResolver | |
| 15. |
Inspection of header is done by which of the following? |
| A. | InternalViewResolver |
| B. | ContentNegotiatingViewResolver |
| C. | ContentNegotiating |
| D. | InternalResolver |
| Answer» C. ContentNegotiating | |
| 16. |
Properties used to determine the correct content and type for a certain web requests. |
| A. | The URL extension provided in a request |
| B. | The HTTP Accept header |
| C. | All of the mentioned |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 17. |
Views that can’t be resolved by InternalResourceViewResolver.$ |
| A. | redirect |
| B. | redirect:prefix |
| C. | redirect:suffix |
| D. | all of the mentioned |
| Answer» B. redirect:prefix | |
| 18. |
View beans from a resource bundle is loaded by. |
| A. | ResourceBundleViewResolver |
| B. | ResourceBundleView |
| C. | ResourceViewResolver |
| D. | None of the mentioned |
| Answer» B. ResourceBundleView | |
| 19. |
By default, XmlViewResolver loads view beans from /WEB-INF/views.xml which is final. |
| A. | True |
| B. | False |
| Answer» C. | |
| 20. |
InternalResourceViewResolver resolves view names into view objects of type. |
| A. | JstlView |
| B. | Jst Library |
| C. | View |
| D. | None of the mentioned |
| Answer» B. Jst Library | |
| 21. |
ViewResolver which maps each view name tol an application’s directory.$ |
| A. | InternalViewResolver |
| B. | InternalResourceViewResolver |
| C. | InternalResolver |
| D. | None of the mentioned |
| Answer» C. InternalResolver | |
| 22. |
Interface for Dispatcher Servlet to auto detect view resolver beans. |
| A. | localeResolver |
| B. | tiles |
| C. | ViewResolver |
| D. | none of the mentioned |
| Answer» D. none of the mentioned | |