What is the difference between request.getAttribute() and request.getParameter()?

Alessandro A. Garbagnati

In a request object you can store, on the server side, some object that can be useful during the processing of your pages. This uses request.setAttribute() and request.getAttribute().

Remember that the life of the request object lasts through all the include and forwards, and ends when the page has been sent back to the browser.

The getParameter() method, instead, will return you the specific parameter that has been passed to the page through GET or POST.