Question: Which of the following code is used to get an attribute in a HTTP Session object in servlets?

Options

A : session.getAttribute(String name)

B : session.alterAttribute(String name)

C : session.updateAttribute(String name)

D : session.setAttribute(String name)

Click to view Correct Answer

Previous ||

Reflection API more questions

What does Class.forName(?myreflection.Foo?).getInstance() return?

What does foo.getClass().getMethod(?doSomething?, null) return?

What is the difference between servlets and applets?^ i. Servlets....

What is used to get class name in reflection?

Which method is used to get three-letter abbreviation for locale's....

How is the dynamic interception of requests and responses to....

When destroy() method of a filter is called?

Which are the session tracking techniques?^ i. URL rewriting^ ii.....

Which of the below is not a session tracking method?

Which of the following code retrieves the body of the....

Annotations more Online Exam Quiz

Design Patterns

Java Beans

JDBC

JSP

JSP Elements

Servlet

Session Management

Web application

Abrasive Jet Machining - Introduction and Machining system

Abrasive Water Jet Machining - Introduction