Given: <jsp:useBean id="temp" class="java.lang.String" /> <% temp="temp"; out.println(temp); %> What is the output? A) temp B) empty C) ServletException D) null A is correct choice. I think var temp in <% temp="temp"; out.println(temp); %> is not defined. How does it work
tricky question. As we all know the jsp generates a servlet from the .jsp-file. These servlets (source + class files) are stored in a special directory (in Tomcat its called <root>/work). Sometimes it helps to examine these files. This is such a case, I think. Then you see, why it is as it is.
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
Devious Experiments for a Truly Passive Greenhouse!