I read the posts on the difference between the attribute and the parameter here.I got this by reading the posts.
Attributes are Objects and set by developer while parameters come from the user request.
Again the attributes are scoped variables.
But still I am having some doubts in my mind about the attribute and parameter
1. What is mean by there attributes "SCOPED VARIABLES" are parameters not scoped one?
2. Again what is need to set attributes externally? Why cant this facility provided for the parameter?
3. Why we do not have parameters as the objects?
I got this question in mind while I was writing above question that
Is attribute introduced later in Servlet and parameters are early one?
Remember that the request is an HTTP request. So it has parameters because HTTP says it has parameters. And those parameters are strings because HTTP says they are strings. This idea didn't just get invented by the people who designed the Java EE specifications, they implemented somebody else's requirements.
As for request attributes: sometimes it is useful to keep track of certain information while the request is being processed, and then discard it when that processing is finished. Hence a design which allows the programmer to do that. This information is called "request attributes". It's also convenient for them to be any Java objects, rather than making an artificial requirement that they have to be strings.