What's the difference between the class and type attributes in the <jsp:useBean> tag.

swarraj kulkarni

The "class" attribute specifies the actual implementaion class for this bean.

"type" (if specified), specifies the superClass or the interface this class implements. If this is not defined, by default the type is same as the implementation class itself. This could be useful for typecasting of the object in the jsp page.