9

Possible Duplicate:
Difference between getAttribute() and getParameter()

I read parameter and attributes as two different topics in j2ee. But I am not able to realize the difference. Can any one clarify?

Community
  • 1
  • 1
satheesh
  • 1,443
  • 7
  • 28
  • 41

2 Answers2

18

Parameters come from the client request. Example: http://google.com?q=1

Here q is a parameter.

Attributes are set by the server side. For example, you can set a session or request attribute called userId to indicate the current user.

Abdullah Jibaly
  • 53,220
  • 42
  • 124
  • 197
3

Objects have attributes which basically is ,their data members. The operations defined on an object which are called as method in JAVA, have parameters in their parantheses, on these parameters the functions operate upon .

BabloBko
  • 69
  • 2
  • 7
  • 1
    On server side the attribute can be added into the component object whereas the parameters come through the remote method calls by http request to the server. – BabloBko Jul 19 '11 at 07:52