It is not printing "hello" because String class is final.
'jsp:useBean id="objRef" class="java.lang.String" scope="application"' creates an attribute in the application scope.
but in the scriptlet, you are doing objRef="hello"; this means that in your file1.jsp, the local variable (referenced by scriptlet) points to a new string "hello", but the original attribute is still an empty string.
SCJP 1.4 - cleared<br />SCWCD 1.4 - cleared!!
Joined: Oct 23, 2006
is there any way to call argumented constructor using useBean?