File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JSP usebean type Vs class
Joined: Jan 16, 2001
Mar 20, 2006 15:30:00
Can anybody explain the difference between the "type" and "class" attributes in <jsp:usebean> tag.
Joined: Jul 06, 2005
Mar 20, 2006 15:38:00
Its all explained here:
"type" specifies the type of the scriptlet variable created.
"class" specifies the class of the variable to be created if it is null.
a contrived example:
<jsp:useBean id="date" type="java.util.Object" class="java.util.Date"
Object date = new
Author and ninkuma
Joined: Jan 10, 2002
Mar 20, 2006 16:06:00
A slightly more up-to-date "syntax card":
[ March 20, 2006: Message edited by: Bear Bibeault ]
Asking smart questions
Books by Bear
It is sorta covered in the
JavaRanch Style Guide
subject: JSP usebean type Vs class
Clarification in Class Type's in Java
About type and class attribute of jsp usebean
Ridiculous Syntax in JAVA generics
How to typecast an object which is of unknown class type at runtime?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014