G
gk
while using JSTL i found
<jsp:useBean id="now" class="java.util.Date"/>
Page loaded at: ${now}
this prints the current date.
Question : is NOT <jsp:useBean tag only exclusive for javabeans only
......see, there is "Bean" in the tag...so, i think...it only should be
used for JAVABEANS only but as such Date is a class not JAVABEAN(which
has setter and getter).
i am confused.
is this tag <jsp:useBean can be used for any class ? is this be used
for the classes which does not have getter and setter methods ?
thank you
<jsp:useBean id="now" class="java.util.Date"/>
Page loaded at: ${now}
this prints the current date.
Question : is NOT <jsp:useBean tag only exclusive for javabeans only
......see, there is "Bean" in the tag...so, i think...it only should be
used for JAVABEANS only but as such Date is a class not JAVABEAN(which
has setter and getter).
i am confused.
is this tag <jsp:useBean can be used for any class ? is this be used
for the classes which does not have getter and setter methods ?
thank you