An online jewelry retailer wishes to customize their online catalog for users who are logged in. They went to show specials for the user's brithstone month. The company's special offers are stored as a Map<String, Special> identified as specials in application scope.
There is a bean stored as a session-scoped attribute named userInfo. Calling getBirthdate().getMonth() on this bean will return the user's birthsone month.
Which of the following code snippets could correctly retrieve the appropriate special offerings?
I tried to code it:
In the servlet, I have this code snippets:
The jsp is :
But the output is :
User info birthdate : 1
So, obviously option B does not work.
The relevant EL in the jsp is:
The output printed is:
Special Map: [Lmurach.business.Special;@7cba55c5