Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request attribute and request properties

 
zelynn goay
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am quite confused with request attribute and request properties. please help. Thank you.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean requestAttributes and requestParameters?

Request parameters are generated by the container from the HTTP querystring and post parameters.

Request Attributes are object that you bind to session in order to be able to retrieve them in another component. The most typical example would be to bind a bean to request scope from a servlet with request.setAttribute(id, object) from a servlet (controller) and then retrieving it from a JSP (view) using request.getParameter(id) or a jsp:useBean tag.
[ June 14, 2005: Message edited by: Ben Souther ]
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most typical example would be to bind a bean to request scope from a servlet with request.setAttribute(id, object) from a servlet (controller) and then retrieving it from a JSP (view) using request.getParameter(id) or a jsp:useBean tag.

That should actually read request.getAttribute(id).

(It is very rare that one gets a chance to correct Ben regarding servlets... must have been an early morning today )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic