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.
Elbert
2 months agoMaurine
11 days agoKristeen
21 days agoRodolfo
1 months agoDulce
1 months agoHubert
2 months agoSerina
2 months agoErasmo
1 months agoLavelle
1 months agoKarol
1 months agoLewis
2 months agoAdelle
2 months agoKeneth
2 months agoFrancesco
2 months agoAshlyn
2 months agoLajuana
2 months agoHuey
2 months agoHuey
2 months agoLottie
3 months agoInocencia
3 months agoWillie
1 months agoJaleesa
2 months agoEun
2 months agoArdella
2 months agoAlyce
3 months agoCurtis
3 months agoOlga
2 months agoAlita
2 months agoPeggy
3 months ago