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.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact