Close
« Tutorial

Spring MVC - @SessionAttribute MCQ

0/13
0 ✓
0 ✗

1. What is the purpose of the @SessionAttribute annotation?

2. Since which Spring version is @SessionAttribute available?

3. Where can the @SessionAttribute annotation be placed?

4. What is one benefit of using @SessionAttribute instead of using HttpSession directly?

5. What is the default value of the required element in @SessionAttribute?

6. What happens if the session attribute is missing and required is true?

7. What happens if the session attribute is missing and required is set to false?

8. Which element of @SessionAttribute is used to give the name of the session attribute?

9. What is the relationship between the value and name elements of @SessionAttribute?

10. Which statement about @SessionAttributes (with an s) is correct?

11. Which kind of session attributes is @SessionAttribute designed for?

12. Which of these is a good place to put an attribute into the session before a controller reads it with @SessionAttribute?

13. Which use case is best suited for @SessionAttribute?

14. Which use case is best suited for @SessionAttributes (with an s) rather than @SessionAttribute?

15. What does it mean that @SessionAttribute works with a pre-existing session attribute?

Join