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 <
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 java.util.Date();
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
I agree. Here's the link:
subject: JSP usebean type Vs class
Clarification in Class Type's in Java
About type and class attribute of jsp usebean
How to typecast an object which is of unknown class type at runtime?
Ridiculous Syntax in JAVA generics
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014