When you use the jsp:UseBean tag, it works sort of like this:
BeanType beanID = pageContext.findAttribute(beanID, scope);
if (beenID == null)
beanID = new BeanClass();
The value of the class attribute is used to define the actual class of the object. If it is specified, and there is no object with the ID in the scope you define, then that class is used to create a new object with the given id. If no class is specified then no new object can be created.
The value of the type attribute is used to define the type (or the left side of the assignment operator) we refer to the bean object as, which is usually a super-class or an interface implemented by the bean. It is like when you refere to a HashMap as a Map in normal Java code:
Map myMap = new HashMap();
Like the reference to Map when using a HashMap, it means that for future code you refer to the object in a more generalized fashion, so the actual class may be changed as an implementation detail.
At least one of those two attributes need to be defined. If only the class attribute is assigned it will be used for both the type on the left side of the assignment operator, and the class on the right side. If only the type is defined, then it will be able to retrieve the object that was previously defined, but can not instantiate a new object if the previous one was not found.
The BeanName is another alternative to the class atgtribute, not an alternative to the id. The id attribute is mandatory to identify the bean. The BeanName attribute allows you to instantiate the bean from a serialized template of the object, rather than using a new () operator to create the object like the class attribute does.
For more info, check out:
http://java.sun.com/products/jsp/syntax/2.0/syntaxref20.html
and click on the <jsp:UseBean> link.