This topic contains a solution. Click here to go to the answer

Author Question: For a HttpSession, say session, how do you get its attribute? (Read 287 times)

james

  • Hero Member
  • *****
  • Posts: 573

Question 1

For a HttpSession, say session, how do you set an attribute pair with name lastName and value Smith?
◦ session.attribute("lastName", "Smith")
◦ session.setAttribute("lastName", "Smith")
◦ session.setValue("lastName", "Smith")
◦ session.value("lastName", "Smith")

Question 2

For a HttpSession, say session, how do you get its attribute?
◦ session.getValue("lastName")
◦ session.value("lastName")
◦ session.getAttribute("lastName")
◦ session.attribute("lastName")


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by james on May 6, 2020

dlook33

  • Sr. Member
  • ****
  • Posts: 344
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 49% of students answer this correctly




james

  • Member
  • Posts: 573
Reply 2 on: May 6, 2020
Wow, this really help


diana chang

  • Member
  • Posts: 288
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

People who have myopia, or nearsightedness, are not able to see objects at a distance but only up close. It occurs when the cornea is either curved too steeply, the eye is too long, or both. This condition is progressive and worsens with time. More than 100 million people in the United States are nearsighted, but only 20% of those are born with the condition. Diet, eye exercise, drug therapy, and corrective lenses can all help manage nearsightedness.

Did you know?

As many as 20% of Americans have been infected by the fungus known as Histoplasmosis. While most people are asymptomatic or only have slight symptoms, infection can progress to a rapid and potentially fatal superinfection.

Did you know?

Always store hazardous household chemicals in their original containers out of reach of children. These include bleach, paint, strippers and products containing turpentine, garden chemicals, oven cleaners, fondue fuels, nail polish, and nail polish remover.

Did you know?

According to the American College of Allergy, Asthma & Immunology, more than 50 million Americans have some kind of food allergy. Food allergies affect between 4 and 6% of children, and 4% of adults, according to the CDC. The most common food allergies include shellfish, peanuts, walnuts, fish, eggs, milk, and soy.

Did you know?

Although the Roman numeral for the number 4 has always been taught to have been "IV," according to historians, the ancient Romans probably used "IIII" most of the time. This is partially backed up by the fact that early grandfather clocks displayed IIII for the number 4 instead of IV. Early clockmakers apparently thought that the IIII balanced out the VIII (used for the number 8) on the clock face and that it just looked better.

For a complete list of videos, visit our video library