Spring/Spring Mcq Set 6 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


Question:
 Interface implemented by locale resolver.

1.localeResolver

2. tiles

3. front controller

4.none of the mentioned


Question:
 Interface used to resolve text messages.

1. Message

2.Message_Source

3.Language

4.MessageSource


Question:
 SpEL statements are recognizable.

1. True

2.False

3.error

4.None of these


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


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

1.True

2.False

3.error

4.None of these


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


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


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


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


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


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

1.True

2. False

3.error

4.None of these


Question:
Alternative way to resolve locales.

1.AcceptHeaderLocale

2.AcceptHeader

3.AcceptHeaderLocaleResolver

4.SessionLocaleResolver


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

1.@NotNull

2.@Size

3.@MaxSize

4. @size


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

1. @Value

2.@After

3.@Default

4.@None


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

1.@NotNULL

2.@NotNull

3.All of the mentioned

4.none of the mentioned


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

1.@Pattern

2.@EmailRecognizer

3.@Email

4.@Null


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


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

1. True

2.False

3.error

4.None of these


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


Question:
Callback methods provided by HandlerInterceptor to implement.

1.preHandle()

2.postHandle()

3.afterCompletion()

4. all of the mentioned


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

1. True

2. False

3.error

4.None of these


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

1.True

2.False

3.error

4.None of these


Question:
Default localeResolver used by Spring.

1. AcceptHeaderLocale

2.AcceptHeader

3. AcceptHeaderLocaleResolver

4.AcceptLocaleResolver


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


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

1. InternalViewResolver

2. ContentNegotiatingViewResolver

3.ContentNegotiating

4. InternalResolver


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

1. localeResolver

2. tiles

3. ViewResolver

4. none of the mentioned


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

1.JstlView

2. Jst Library

3. View

4. None of the mentioned


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

1.True

2.False

3.error

4.None of these


Question:
Method used to change user’s locale.

1.set

2.setLocale

3. locale

4. set_locale


Question:
Parameter used to specify a configuration file.

1. contextConfigLocation

2.contextConfigure

3.contextLocation

4. none of these


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

1.locale

2.languageURL

3.language

4.none of the mentioned


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


Question:
Property of LocaleChangeInterceptor used to customize parameter name.

1. localeResolver.setLocale

2.paramName

3.locale.parm

4.none of the mentioned


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

1.cookieMaxAge

2.cookieName

3.cookieAge

4.none of the mentioned


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

1.True

2. False

3.error

4.None of these


Question:
Tag used by view to resolve text messages.

1. spring:message

2.spring:language

3.spring:title

4.none of the mentioned


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


Question:
The cookieMaxAge value when browser is closed.

1. 0

2.1

3. -1

4. true


Question:
The ResourceBundleMessageSource implementation resolves messages for different locales.

1.True

2. False

3.error

4.None of these


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

1. AbstractExcelView

2.AbstractJExcelView

3.None of the mentioned

4. All of the mentioned


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


Question:
To add attributes to the model.

1. Map

2.ModelMap

3.All of the mentioned

4.none of the mentioned


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

1. SimpleMappingExceptionResolver

2.ExceptionResolver

3.ExceptionViewResolver

4.None of the mentioned


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


Question:
To notify its completion of session processing.

1. Errors

2.BindingResult

3. SessionStatus

4.None of the mentioned


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


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

1. ResourceBundleViewResolver

2.ResourceBundleView

3. ResourceViewResolver

4.None of the mentioned


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

1.InternalViewResolver

2.InternalResourceViewResolver

3.InternalResolver

4.None of the mentioned


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

1. redirect

2.redirect:prefix

3.redirect:suffix

4. all of the mentioned


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
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite 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!