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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
regrubmil1

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

Post 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

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Yes, you can assume that things that are not specified are valid and do not affect the answer.

bluster
Posts: 60
Joined: Wed Apr 23, 2014 6:38 pm
Contact:

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

Post 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!

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. The explanation is not correct. Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests