| Author |
getParameter,getAttribute
|
Bharadwaj Adepu
Ranch Hand
Joined: Dec 30, 2007
Posts: 99
|
|
|
Can anyone please explain in detail what is the Difference between getParameter() and getAttribute().
|
SCJP 1.5
|
 |
Ankur Bohra
Greenhorn
Joined: Jun 29, 2007
Posts: 19
|
|
getAttribute() returns an object so when ever we use a getAttribute() we have to cast the return type that is we have to convert it to the required type like string or int.getParameter always returns a string. one more difference is where this 2 methods are used...getAttribute is used to get the values from the session and getParameter is used to get the values from the form.(html or a jsp file)
|
Sun Certified Java Programmer<br />Sun Certified Web Component Developer <br />National Stock Exchange Certification in Financial Market
|
 |
 |
|
|
subject: getParameter,getAttribute
|
|
|