aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and JSP Programming Fundamentals
  • Which of the following is the right syntax of the setAttr...
Multiple choice

Which of the following is the right syntax of the setAttribute() method of the session object in JSP?

  1. setAttribute(String name)

  2. setAttribute(Object value)

  3. setAttribute(String name, Object value)

  4. setAttribute(String name, String value)

  5. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is a correct syntax of setAttribute method.

Keep practicing — related questions

  • Which of the following types define the methods getAttribute() and setAttribute() ? (Choose all that apply)
  • Which of the following methods of the HttpSession interface of java servlet is used to remove the session f...
  • What statements are correct about the method PageContext.findAttribute(String name)?
  • Which of the following is/are correct about the getAttribute method and the getAttributeNames method in the...
  • Which of the following is not the value of scope attribute in jsp?
  • What will happen when the HttpSession.setAttribute() method is called the second time with the same attribu...
  • What does invalidate() method of session in JSP (Java Server Pages) do?
  • Which of the following is not a method of HttpServletResponse Object in JSP (Java Server Pages)?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy