Multiple choice technology

The method used for fetching object in the request object is __________

  1. getAttribute()

  2. getParameter()

  3. getInitParameter()

  4. none

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

getAttribute() retrieves object-level attributes stored in the request scope. This is different from getParameter() which retrieves string form parameters from the query string or POST body, and getInitParameter() which retrieves servlet initialization parameters from web.xml. Attributes are typically set by the application using setAttribute() to share data between components, while parameters come from client requests.