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.:getAttributes returns values set by programmer. Where as getParameter returns the value which comes from outside resource.:Always do a request.getParameter() to extract request parameters (i.e. data sent by posting a html form ). The request.getParameter() always returns String value and the data come from client.
Category:JSP Interview Questions
No comments:
Post a Comment