You work as a programmer for uCertify.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1. Which of the following will be used to retrieve Attribute1?
Each correct answer represents a complete solution. Choose all that apply.
The following two code are used to retrieve Attribute1:
1.Object obj=session1.getAttribute('Attribute1'); The getAttribute() method is used to retrieve the bound object with the specified
name in this session, or null if no object is bound under the name.
2.Object obj=binding1.getSession().getAttribute('Attribute1'); The getSession() gets the current valid session associated with this
request.
Answer E and C are incorrect. These code are invalid because the getAttribute() method returns an object instead of a long object or
a String object.
Answer B is incorrect. The HttpSessionBindingEvent object cannot use the getAttribute() method.
Annabelle
8 months agoZana
9 months agoTasia
9 months agoCelestina
9 months agoDarrin
9 months agoRolland
9 months agoLavera
10 months agoJeanice
10 months agoShawnda
10 months agoArdella
10 months agoSilvana
10 months agoShawn
10 months agoLaurel
10 months agoLai
10 months agoWinfred
10 months agoKeneth
10 months agoJohna
10 months ago