Spring/Spring%20Mcq%20Set%206 Sample Test,Sample questions

Question:
 ContentNegotiatingViewResolver resolver configuration sets up the resolver to have the highest priority among all resolvers.

1. True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 08:02:30


Question:
 Interface implemented by locale resolver.

1.localeResolver

2. tiles

3. front controller

4.none of the mentioned

Posted Date:-2022-01-03 07:54:04


Question:
 Interface used to resolve text messages.

1. Message

2.Message_Source

3.Language

4.MessageSource

Posted Date:-2022-01-03 07:57:39


Question:
 SpEL statements are recognizable.

1. True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 08:04:19


Question:
 Spring MVC supports generating Excel files using which of the following libraries.

1.Apache POI library

2.JExcelAPI library

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-03 09:28:59


Question:
 The @RequestMapping annotation can be applied to the class level only.

1.True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 07:52:30


Question:
 The ContentNegotiatingViewResolver resolver first determines the media type for a request based on which of the following criteria?

1. It checks a request path extension

2. If a request path has an extension but no match can be found in the default mediaTypes section of the ContentNegotiatingViewResolver bean

3.If no extension is present in a request path, the HTTP Accept header of the request is used

4. All of the mentioned

Posted Date:-2022-01-03 08:02:55


Question:
 To use JSR-303 bean validation in a web application, dependencies to be added in maven.

1.javax.validation

2.org.hibernate

3.all of the mentioned

4.none of the mentioned

Posted Date:-2022-01-03 09:29:24


Question:
 To validate Java beans in a web application using annotations.

1.XML

2. Java Based

3. JAR-303 standard

4.All of the mentioned

Posted Date:-2022-01-03 08:05:21


Question:
 You can define a locale resolver by registering a bean of type LocaleResolver in the web application context.

1. True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 07:54:28


Question:
A field named validator is of type.

1.javax.validation.Validator

2.javax.validation.ValidatorFactory

3.javax.validation.ValidatorFactor

4.none of the mentioned

Posted Date:-2022-01-03 09:31:12


Question:
AcceptHeaderLocaleResolver esolves locales by inspecting the accept-language header of an HTTP request.

1.True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 07:55:11


Question:
Alternative way to resolve locales.

1.AcceptHeaderLocale

2.AcceptHeader

3.AcceptHeaderLocaleResolver

4.SessionLocaleResolver

Posted Date:-2022-01-03 07:55:33


Question:
Annotation used to indicate a field has to have a minimum of 2 characters.

1.@NotNull

2.@Size

3.@MaxSize

4. @size

Posted Date:-2022-01-03 09:30:19


Question:
Annotation which allows a controller’s field to be assigned using Spring Expression Language(SpEL)

1. @Value

2.@After

3.@Default

4.@None

Posted Date:-2022-01-03 08:03:58


Question:
Annotation which indicates a field cannot be a null.

1.@NotNULL

2.@NotNull

3.All of the mentioned

4.none of the mentioned

Posted Date:-2022-01-03 09:29:58


Question:
Annotation which receives a value in the form regexp=”.+@.+\.[a-z]+”.

1.@Pattern

2.@EmailRecognizer

3.@Email

4.@Null

Posted Date:-2022-01-03 09:30:48


Question:
Bean classes pre-registered in the web application context by default.

1.DefaultAnnotationHandlerMapping

2.AnnotationMethodHandlerAdapter

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-03 07:52:56


Question:
By default, @RequestMapping gets all the POST Requests.

1. True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 07:53:14


Question:
By default, XmlViewResolver loads view beans from /WEB-INF/views.xml which is final.

1.True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 08:00:28


Question:
Callback methods provided by HandlerInterceptor to implement.

1.preHandle()

2.postHandle()

3.afterCompletion()

4. all of the mentioned

Posted Date:-2022-01-03 07:53:37


Question:
Controller Class renders the objects passed by the controller’s handler method.

1. True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 07:51:51


Question:
cookieName is used by localeResolver to customize the cookie used.

1.True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 07:58:32


Question:
Default localeResolver used by Spring.

1. AcceptHeaderLocale

2.AcceptHeader

3. AcceptHeaderLocaleResolver

4.AcceptLocaleResolver

Posted Date:-2022-01-03 07:54:51


Question:
In a Spring MVC application, you can register one or more exception resolver beans in the web application context to resolve uncaught exceptions.

1.True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 08:03:14


Question:
Inspection of header is done by which of the following.

1. InternalViewResolver

2. ContentNegotiatingViewResolver

3.ContentNegotiating

4. InternalResolver

Posted Date:-2022-01-03 08:02:09


Question:
Interface for Dispatcher Servlet to auto detect view resolver beans.

1. localeResolver

2. tiles

3. ViewResolver

4. none of the mentioned

Posted Date:-2022-01-03 07:59:28


Question:
InternalResourceViewResolver resolves view names into view objects of type.

1.JstlView

2. Jst Library

3. View

4. None of the mentioned

Posted Date:-2022-01-03 08:00:11


Question:
LocaleChangeInterceptor can only detect the parameter for the handler mappings that enable it.

1.True

2.False

3.error

4.None of these

Posted Date:-2022-01-03 07:56:55


Question:
Method used to change user’s locale.

1.set

2.setLocale

3. locale

4. set_locale

Posted Date:-2022-01-03 07:56:13


Question:
Parameter used to specify a configuration file.

1. contextConfigLocation

2.contextConfigure

3.contextLocation

4. none of these

Posted Date:-2022-01-03 07:52:14


Question:
Parameter which can change user’s locale by any URL.

1.locale

2.languageURL

3.language

4.none of the mentioned

Posted Date:-2022-01-03 07:57:19


Question:
Properties used to determine the correct content and type for a certain web requests.

1. The URL extension provided in a request

2.The HTTP Accept header

3. All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-03 08:01:45


Question:
Property of LocaleChangeInterceptor used to customize parameter name.

1. localeResolver.setLocale

2.paramName

3.locale.parm

4.none of the mentioned

Posted Date:-2022-01-03 07:56:39


Question:
Property which indicates how many seconds this cookie should be persisted.

1.cookieMaxAge

2.cookieName

3.cookieAge

4.none of the mentioned

Posted Date:-2022-01-03 07:55:54


Question:
Spring doesn’t cope up with pdf and excel views.

1.True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 09:32:27


Question:
Tag used by view to resolve text messages.

1. spring:message

2.spring:language

3.spring:title

4.none of the mentioned

Posted Date:-2022-01-03 07:58:01


Question:
Tag, used to define a location in which to place errors in case a form.

1. form

2.form:GET

3. form:POST

4. form:errors

Posted Date:-2022-01-03 08:04:42


Question:
The cookieMaxAge value when browser is closed.

1. 0

2.1

3. -1

4. true

Posted Date:-2022-01-03 07:58:54


Question:
The ResourceBundleMessageSource implementation resolves messages for different locales.

1.True

2. False

3.error

4.None of these

Posted Date:-2022-01-03 07:58:16


Question:
The view classes for Excel view is/are:-

1. AbstractExcelView

2.AbstractJExcelView

3.None of the mentioned

4. All of the mentioned

Posted Date:-2022-01-03 09:33:00


Question:
To access the binding and validation result for the command object.

1. Errors

2. BindingResult

3.All of the mentioned

4.None of the mentioned

Posted Date:-2022-01-03 07:51:13


Question:
To add attributes to the model.

1. Map

2.ModelMap

3.All of the mentioned

4.none of the mentioned

Posted Date:-2022-01-03 07:50:54


Question:
To configure the exception mappings in the web application context.

1. SimpleMappingExceptionResolver

2.ExceptionResolver

3.ExceptionViewResolver

4.None of the mentioned

Posted Date:-2022-01-03 08:03:37


Question:
To hold any errors detected from validating the instance of beans.

1.javax.validation.Validator

2. javax.validation.ValidatorFactory

3.javax.validation.ValidatorFactor

4.javax.validation.ConstraintViolation

Posted Date:-2022-01-03 09:32:05


Question:
To notify its completion of session processing.

1. Errors

2.BindingResult

3. SessionStatus

4.None of the mentioned

Posted Date:-2022-01-03 07:51:34


Question:
Validator field is not assigned to any bean, but rather a factory class of the type.

1. javax.validation.Validator

2. javax.validation.ValidatorFactory

3. javax.validation.ValidatorFactor

4. none of the mentioned

Posted Date:-2022-01-03 09:31:37


Question:
View beans from a resource bundle is loaded by.

1. ResourceBundleViewResolver

2.ResourceBundleView

3. ResourceViewResolver

4.None of the mentioned

Posted Date:-2022-01-03 08:00:48


Question:
ViewResolver which maps each view name tol an application’s directory.

1.InternalViewResolver

2.InternalResourceViewResolver

3.InternalResolver

4.None of the mentioned

Posted Date:-2022-01-03 07:59:52


Question:
Views that can’t be resolved by InternalResourceViewResolver.

1. redirect

2.redirect:prefix

3.redirect:suffix

4. all of the mentioned

Posted Date:-2022-01-03 08:01:15


More MCQS

  1. Spring Mcq Set 1
  2. Spring Mcq Set 2
  3. Spring Mcq Set 3
  4. Spring Mcq Set 4
  5. Spring Mcq Set 5
  6. Spring Mcq Set 6
  7. Spring Mcq Set 7
  8. Spring Mcq Set 8
  9. Spring Mcq Set 9
  10. Spring Mcq Set 10
  11. Spring Mcq Set 11
  12. Spring Mcq Set 12
  13. Spring Mcq Set 13
  14. Spring Mcq Set 14
  15. Spring Mcq Set 15
  16. Spring Mcq Set 16
  17. Spring Mcq Set 17
  18. Spring Mcq Set 18
  19. Spring Mcq Set 19
  20. Spring Mcq Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!