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
com.enthuware.ets.scwcd.v5.2.329 about mentioning imports
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning imports
Yes, you can assume that things that are not specified are valid and do not affect the answer.
-
- Posts: 60
- Joined: Wed Apr 23, 2014 6:38 pm
- Contact:
Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning impor
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:
It seems it might need to be something as:
Can someone comment if the blue explanation os OK and that answer qualifies as valid scriptlet code. Thanks!<% out.println("Hello World"); %>
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: com.enthuware.ets.scwcd.v5.2.329 about mentioning impor
You are right. The explanation is not correct. Fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 4 guests