Page 1 of 1
About Question com.enthuware.ets.scwcd.v5.2.113 :
Posted: Sat Jan 07, 2012 7:06 am
by ETS User
Why this statement (<jsp:useBean id="mystring" class="java.lang.String" />) compiles and runs properly and this other (<jsp:useBean id="myint" class="java.lang.Integer" />, Question 10) NOT?
Neither has not a public no-args constructor. ¿Why the behavior is diferent?
Best regards
Jose
Re: About Question com.enthuware.ets.scwcd.v5.2.113 :
Posted: Sat Jan 07, 2012 7:10 pm
by admin
String does have a no args constructor. Integer doesn't.
HTH,
Paul.
Re: About Question com.enthuware.ets.scwcd.v5.2.113 :
Posted: Tue Oct 28, 2014 10:57 am
by bluster
myint = (java.lang.String) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "java.lang.String");
I think the author meant "mystring" above, and pasted "myint" from another question.
Re: About Question com.enthuware.ets.scwcd.v5.2.113 :
Posted: Tue Oct 28, 2014 8:48 pm
by admin
Fixed. thank you for your feedback!