Page 1 of 1

com.enthuware.ets.scwcd.v5.2.329 about mentioning imports

Posted: Sat Feb 12, 2011 2:53 pm
by regrubmil1
Hi,

Just wondering. I just encountered a question:

Which of the following are correct JSP expressions?
and the correct answer was : <%= new Date() %>

Without importing java.util.Date, this fragment will not compile...

On the real exam, can and must we assume that all the necessary imports are taken care of?

Thanks for any help!

Bert

Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning imports

Posted: Sat Feb 12, 2011 9:36 pm
by admin
Yes, you can assume that things that are not specified are valid and do not affect the answer.

Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning impor

Posted: Sat Nov 01, 2014 2:26 pm
by bluster
The explanation for wrong answer <% "Hello World"; %> has this as a valid scriptlet. Not sure that claim is accurate, since that would mean the code can compile as is inside _jspService.

It seems it might need to be something as:
<% out.println("Hello World"); %>
Can someone comment if the blue explanation os OK and that answer qualifies as valid scriptlet code. Thanks!

Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning impor

Posted: Sun Nov 02, 2014 2:41 am
by admin
You are right. The explanation is not correct. Fixed.
thank you for your feedback!