What will be the result of this jsp line if the user takes a look at the page source code? <!-- Today is <%= new java.util.Date() %>.Hava a nice day -->
1) It won't compile 2) The user won't see the comment 3) The user will see the same jsp line as above 4) The user will see the comment with the current date because the expression is evaluated at runtime.
Answer given is
4) The user will see the comment with the current date because the expression is evaluated at runtime.
This example is in the JSP especifications.
But I thought comments will be ignored when jsp is converted to a servlet.Then how will the scriptlet get executed?
oops...I'm sorry....I didn't read the question properly. All the questions that we have come across so far have only asked us to tell what results in the broswer....Anyways thanks for pointing out my mistake and now I'll be aware of such questions as well.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!