The method used for fetching object in the request object is __________
-
getAttribute()
-
getParameter()
-
getInitParameter()
-
none
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.