• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confuse yet!!!

 
Higor Zardo
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My doubt is what`s the real difference between param and requestScope in EL?
Thank you if you can help me!!

Higor
 
Lakshmi Narayanan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
param is kind of query string for GET and form parameters for POST

requestScope is the attributes in request
 
Kunal Gandhi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
requestScope and param both are types of map. requestScope contains request scoped attribute name as key and its value as a value in a map. Whereas, param contains form parameter name as key and its value as a value in a map.
 
Higor Zardo
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lakshmi Narayanan and Kunal Gandhi,
thank youuuu!!!
It help me a lot!!

Higor
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

A "parameter"(param) is a form field name/value pair passed from the HTML side of the world or other hand query string. Its value is a String.

An "attribute"(requestScope) is a Java object name/value pair passed only through the internal JavaServer processes. (I.e. it can come from a JSP or servlet but not an HTML page.) Its value is an Object.

You can't alter the request parameters, just read them. If you could there would be a setParameter() method. Parameters and attributes do not share a name space so a parameter named "foo" and an attribute keyed "foo" are distinct.

Hope This Helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic