Hi Annie,
Attribute has a name and corresponding value.
where name is always a
String type object.
Using that name we can retrieve the value (the actual object you may store)
So the code needs to be changed:
2. Enumeration e=context.getAttributeNames();
3. while(e.hasMoreElements())
4. {
5. String sm = (String)e.nextElement();
A objA= (A) context.getAttribute(sm);
6. }
But here you will get only the last object in objA.
Cheers
Binu