An attribute is an object which can be bounded into three other servlet objects- HttpServletRequest, HttpSession, ServletContext.
You can think of it as a name value pair where name is String and value is Object. It can have three types of scope- context,request,session
Remember attributes are not parameters:
In attribute you can share an object but in case of parameter you can share a string.
For setting attribute the method setAttribute() is used but for parameter there is no method, should be set in the DD.
The return type of attribute(getAttribute()) is Object but for parameter(getInitParameter()) it is String.